Angular 2, webpack extract-text-webpack-plugin doesn't work -


i have structure folder angular 2 application:

https://i.stack.imgur.com/gbxjs.png

an want .scss files inside /app compile inline js modules of angular 2 app, , .scss files in (/public/assets/styles/) compile , extract in file /public/assets/styles/main.css plugin don't work web pack configuration i'm doing wrong?

var webpack = require('webpack');  var webpackmerge = require('webpack-merge');  var extracttextplugin = require("extract-text-webpack-plugin");  var htmlwebpackplugin = require('html-webpack-plugin');  var path = require('path');    module.exports = {      context: path.resolve(__dirname, '../src'),      entry: {          'polyfills': './polyfills',          'vendor': './vendor',          'app': './main',      },      resolve: {          extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html']      },      module: {          loaders: [{              test: /\.ts$/,              loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'angular2-router-loader'],              exclude: [/\.(spec|e2e)\.ts$/, /node_modules/]          }, {              test: /\.scss$/,              exclude: /app/,              loader: extracttextplugin.extract('style', 'css!sass')          }, {              test: /\.scss$/,              exclude: /public/,              loaders: ['raw', 'sass']          }, {              test: /\.(html)$/,              loader: 'raw'          }]      },      plugins: [          new extracttextplugin('main.css'),                  new webpack.optimize.commonschunkplugin({              name: ['vendor', 'polyfills'],          }),          new htmlwebpackplugin({              template: './public/index.html',              chunkssortmode: 'dependency'          })      ],  }


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -