Open linyi01 opened 8 years ago
Same issue here (I have a different public path than usual). So it generates the font files properly but the require to generate CSS files is not working.
output: {
path: path.join(__dirname, '../dist'),
filename: 'bundle.js',
publicPath: 'http://localhost:3000/'
},
ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/cdb8f36dd927c0c211ce6ad980247d74-Awesomecons.eot in /Users/........../src/fonts/icons
@ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:88-170
ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/61a8badb24a0fb8cded9d75b6d9b572e-Awesomecons.woff in /Users/........../src/fonts/icons
@ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:223-306
ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/3ecd05a81970adec606ff2922b05c922-Awesomecons.ttf in /Users/........../src/fonts/icons
@ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:339-421
ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/3a61225d681cdef00a2e236b3a1983fd-Awesomecons.svg in /Users/........../lp_kiosk/src/fonts/icons
@ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:458-540
I think the problem is exactly the same.
Same issue. If all it takes to solve is the PR, please merge!
Same issue, please merge the PR 🙏
Hi @IngwiePhoenix Can you help me merge and release this issue (https://github.com/DragonsInn/fontgen-loader/pull/23/files). I work in a team, so difficult to maintain and waste time to fix directly module after install or deploy :( . Thank you.
Is there a work around for this besides merging this PR?
A workaround I've been using is just using 'embed' property like so:
{
"test": /\.font\.(js|json)$/,
"loader": 'style!css!fontgen?embed'
}
which creates data-uri instead of having paths.
@kumar935 That's what I'm using as a workaround but not ideal though.
Guys,
I took over the project and fixed some issues as it wasn't being updated. It is here, I renamed it as webfonts-loader
so I can push it on npm.
Cheers, Jerome
Cool, I'll use yours going forward!
fontgen-loader uses path.join(pub, url) to generate urls in css, but sometimes the publicPath is a CDN link(e.g. https://cdn.com), the generated url is incorrect.