-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] with webpack, inlineView deps (<require from="./style.css"></require>) doesn't work #911
Comments
@huochunpeng's analysis is correct. The This is adequate for It is not adequate for It is hard to come up with a config that caters for all needs. If you use One possible solution is to never include |
The solution you proposed is a breaking change for users' source code. Since all dynamic loading of css files are traced and ONLY traced by aurelia-webpack-plugin,
When aurelia-webpack-plugin do The non-standard @jods4 is this feasible in webpack? |
@huochunpeng Webpack is very flexible and the philosophy of I am not familiar with our CLI but it seems to me that this issue lies into the webpack configuration not the plugin. I suppose that would be a change in our templates for new projects, wouldn't it? If it's a change in new templates then it can't be a breaking change? |
Yes, it's a cli issue. I also sensed adding prefix by webpack-plugin is a violation of webpack design. But is there any way for webpack-plugin to give a hint (other than just issuer) for later webpack config file that a css file is for dynamic loading? Maybe, something like: this dep is traced by plugin "AureliaPlugin", not standard tracer. |
An update to cli template is unavoidable since the current one has bug in supporting basic aurelia convention. In that sense, it's not a breaking change but a hot fix. |
Any update on this? Is there a work-around to get .scss files working with '@inlineView'?
to this:
but not sure what other things that might break later. I only have .scss files of my own, but may end up with other 3rd party or external css at some point. |
@stevies I am not sure there has to be a "work-around" here. You just need a webpack config that matches your usage. If you don't When it comes to 3rd party, you can always filter |
Thanks, I'll keep it simple for now. |
Can be closed? |
No objections from me. |
Still a cli wepack config issue with no solution. |
I'm submitting a bug report
0.34.0
Please tell us about your environment:
Operating System:
all
Node Version:
all
NPM Version:
all
Browser:
all
Language:
all
Loader/bundler:
Webpack
Current behavior:
aurelia-webpack-plugin
did its job to bring in the inlineView required "./style.css". But our cliwebpack.config.js
prevented it from working properly.It's caused by:
The "./style.css" dep loaded from inlineView is NOT from issuer html, so it ended up with style-loader instead of packed as a module.
The dep loaded by inlineView should be treated same as dep loaded by html file.
Need to update the rules to avoid this regression. But I don't know webpack enough to fix this.
cc @jods4 this bug prevents aurelia/webpack-plugin#107 from working.
The text was updated successfully, but these errors were encountered: