diff --git a/package.json b/package.json index 6602a03d..26fc93b4 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,10 @@ "awesome-typescript-loader": "^3.1.2", "css-loader": "^0.26.0", "html-webpack-plugin": "^2.28.0", + "node-sass": "^4.5.3", "raw-loader": "^0.5.1", "rimraf": "^2.5.4", + "sass-loader": "^6.0.6", "to-string-loader": "^1.1.4", "typescript": "~2.2.0", "webpack": "^2.4.1", diff --git a/webpack.config.js b/webpack.config.js index 72de137d..134024c6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,8 +18,7 @@ var webpackConfig = { new webpack.ContextReplacementPlugin( // The (\\|\/) piece accounts for path separators in *nix and Windows /angular(\\|\/)core(\\|\/)@angular/, - path.resolve(__dirname, '../src'), - { + path.resolve(__dirname, '../src'), { // your Angular Async Route paths relative to this root directory } ), @@ -41,6 +40,11 @@ var webpackConfig = { 'angular2-router-loader' ] }, + { + test: /\.scss$/, + exclude: /node_modules/, + loaders: ['raw-loader', 'sass-loader'] // sass-loader not scss-loader + }, { test: /\.css$/, loaders: ['to-string-loader', 'css-loader'] }, { test: /\.html$/, loader: 'raw-loader' } ] @@ -60,8 +64,8 @@ var defaultConfig = { }, resolve: { - extensions: [ '.ts', '.js' ], - modules: [ path.resolve(__dirname, 'node_modules') ] + extensions: ['.ts', '.js'], + modules: [path.resolve(__dirname, 'node_modules')] }, devServer: {