Closed cluka closed 6 years ago
Ok. So it's all ok with my registration of the font in Aurelia bundler? And this font does work without problem in Aurelia webpack
@cluka actually no idea, but thats what I'd guess. Just mentioned that I wasn't aware you could use an array for main, so perhaps this is causing the new aurelia auto-tracer to choke
Maybe, I see that there are multiple pull request on it's github that fixes the main that should be string and to move the array to files.
There are two issues here.
This issue can be fixed with an explicit config
"dependencies": [
//...
{
"name": "material-design-iconic-font",
"path": "../node_modules/material-design-iconic-font",
"main": "dist/css/material-design-iconic-font.min.css"
}
]
For that reason, this issue can be closed.
<require from="some.css"></require>
. cli+requirejs has never supported import "some.css"
in js file, our cli+webpack supports it with style-loader
plugin.I think it could be a good improvement to cli+requirejs to support import "some.css"
, so people can easily migrate their code from webpack app to requirejs app. I will keep it on my todo list.
I will make cli more resilient in this situation, instead of panic, I can ignore the malformed main. You will see a missing main warning, but css import will still work.
The fix means you don't need explicit config in aurelia.json.
@huochunpeng Damn you're fast :-). Thanks man. About the import edit, yes i did replace it with require, as it was like you thought, I moved from webpack.
I think it could be a good improvement to cli+requirejs to support import "some.css", so people can easily migrate their code from webpack app to requirejs app.
It's fine for me, now that i know how to import them.
Congratulations for migrating from webpack to cli bundler!
It will take some time to heal your trauma, you might still wake up in nightmare in next few weeks. Deep breathe, brother, Deep breathe... it was all over now. 🤣
Lol
On Fri, Oct 12, 2018, 09:51 huochunpeng notifications@github.com wrote:
Congratulations for migrating from webpack to cli bundler!
It will take some time to heal your trauma, you might still wake up in nightmare in next few weeks. Deep breathe, brother, Deep breathe... it was all over now. 🤣
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aurelia/cli/issues/934#issuecomment-429237494, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvhiP4j4evuOt9qYv8cYdTfir0UOcbWks5ukEnrgaJpZM4XXdUb .
I'm submitting a bug report
Please tell us about your environment:
Operating System: Windows [10]
Node Version: 10.10.0
NPM Version: 6.4.1
Browser: all
Language: TypeScript 3.0.1
Loader/bundler: RequireJS
Current behavior: au start displays an error when it tries to bundle material-design-iconic-font
Reproduce:
"copyFiles":{ "node_modules/material-design-iconic-font/dist/fonts/*":"material-design-iconic-font/dist/fonts" },
into aurelia.json after "bundles"<require from="material-design-iconic-font/dist/css/material-design-iconic-font.min.css"></require>
into app.htmlError is in the image