Created
January 25, 2017 21:56
-
-
Save garywu/3b13b95e0e49283c32118bf58a92e002 to your computer and use it in GitHub Desktop.
startup webpack.config with less
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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