-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (40 loc) · 1.18 KB
/
webpack.config.js
File metadata and controls
41 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: "./app/index.jsx"
},
output: {
filename: 'bundle.js',
path: 'dist'
},
devtool: 'source-map',
module: {
loaders: [
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.jsx?$/, loader: 'babel-loader?experimental', exclude: ['./node_modules/', './app/js/vendor/'] },
{ test: /\.scss$/, loaders: ["style", "css?sourceMap", "sass?sourceMap"]},
{ test: /\.less$/, loader: ExtractTextPlugin.extract('css?sourceMap!less?sourceMap')}
]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx', '.css', '.scss', '.less'],
modulesDirectories: [
'./node_modules',
'./app/js',
'./app/styles'
]
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(true),
new ExtractTextPlugin('/styles/[name].css'),
new HtmlWebpackPlugin({
inject: false,
template: 'node_modules/html-webpack-template/index.ejs',
appMountId: 'app'
})
],
};