Skip to content

Instantly share code, notes, and snippets.

@garywu
Created January 25, 2017 21:56
Show Gist options
  • Save garywu/3b13b95e0e49283c32118bf58a92e002 to your computer and use it in GitHub Desktop.
Save garywu/3b13b95e0e49283c32118bf58a92e002 to your computer and use it in GitHub Desktop.
startup webpack.config with less
// webpack.config.js
var DashboardPlugin = require('webpack-dashboard/plugin');
module.exports = {
entry: ['./index.js', './example.less'],
output: {
path: "public",
filename: "bundle.js"
},
plugins: [
new DashboardPlugin()
],
module: {
loaders: [{
test: /\.jsx?|\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}, {
test: /.less$/,
loader: 'style!css!less',
exclude: /node_modules/,
progress: true
}]
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment