Closed FranciZ closed 7 years ago
Never mind. Changed the loader in webpack.common.js
as follows. It now works.
const { root } = require('./helpers');
const nodeExternals = require('webpack-node-externals');
/**
* This is a common webpack config which is the base for all builds
*/
module.exports = {
devtool : 'source-map',
target : 'node', // in order to ignore built-in modules like path, fs, etc.
resolve : {
extensions : ['.ts', '.js']
},
output : {
path : root('dist')
},
module : {
rules : [
{ test : /\.ts$/, loader : '@ngtools/webpack' },
{ test : /\.css$/, loader : 'raw-loader' },
{ test : /\.html$/, loader : 'raw-loader' },
{ test: /\.scss$/, loaders: ['raw-loader', 'sass-loader?sourceMap'] },
]
},
plugins : []
};
I can't get the most basic sass setup to work. I'm adding just the
styleUrls
to a component and the necessary loaders towebpack.common.js
. Any help would be appreciated. It compiles as expected and runs using nodemon but the styles are not applied.home-view.component.ts
home-view.component.scss
webpack.common.js