less - webpack output css file -


i'm trying webpack output css file less instead of inline styles. i've been using extract-text-webpack-plugin.

i've set based on documentation , have had @ similar questions on stackoverflow can't figure out why below webpack config file not outputting file or putting in index.html

var webpack = require('webpack'); var extracttextplugin = require('extract-text-webpack-plugin');  module.exports = {     entry: [       'webpack/hot/only-dev-server',       './app/main.js'     ],     output: {         path: __dirname + '/dist',         filename: 'bundle.js'     },     module: {         loaders: [             {               test: /\.js?$/,               loaders: ['react-hot', 'babel'],               exclude: /node_modules/             },             {               test: /\.js$/,               exclude: /node_modules/,               loader: 'babel-loader'             },             {               test: /\.less$/,               loader: extracttextplugin.extract('style', 'css!less')               //loader: "style!css!less"             }         ]     },     plugins: [       new webpack.noerrorsplugin(),       new extracttextplugin('[name].css', {             allchunks: true         })     ]  }; 

in current state, indeed, need embed css manually.

however, if use html webpack plugin (and recommend (-:), automatically injected, explained documentation:

if have css assets in webpack's output (for example, css extracted extracttextplugin) these included <link> tags in html head.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -