Closed plwalters closed 8 years ago
Also this seems related - https://github.com/aurelia/dialog/issues/135
Maybe related: https://github.com/aurelia/webpack-plugin/issues/11
Here is the solution how to avoid errors when using <require from="dialog.css">
. Just two line in webpack config needed.
{ test: /aurelia-dialog\/dist\/commonjs\/dialog\.css/, loader: 'raw'},
{ test: /\.css?$/, exclude: /aurelia-dialog\/dist\/commonjs\/dialog\.css/, loader: 'style!css' },
First we load it with raw-loader and exclude it from loading with css-loader, and you go
I believe this issue is fixed in the latest Webpack implementation stuff @PWKad ?
Sorry folks but it looks like it has not been fixed yet:
WARNING in ./src ^\.\/.*$
Module not found: Error: Can't resolve 'css' in '/Users/.../src'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' prefix when using loaders.
You need to specify 'css-loader' instead of 'css'.
@ ./src ^\.\/.*$
@ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
@ multi aurelia
@kdekooter was fixed in https://github.com/aurelia/webpack-plugin/commit/472558fc33862832b4192896434946fd935e429e which isn't yet released. This is a new problem, caused by breaking changes in latest betas of Webpack v2.
You can workaround this problem either by updating @easy-webpack/config-aurelia
(if you use it), or simply by passing the customViewLoaders
option to the WebpackPlugin with the value:
customViewLoaders: {
'.css': ['css-loader'],
'.scss': ['css-loader', 'sass-loader'],
'.sass': ['css-loader', 'sass-loader'],
'.less': ['css-loader', 'less-loader'],
'.styl': ['css-loader', 'stylus-loader'],
}
Thanks for the swift response @niieani. That saved my day!
More details here -
https://github.com/aurelia/dialog/issues/127
But I believe if a plugin requires css from html file it fails.