forked from smikhalevski/react-text-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.demo.config.js
36 lines (34 loc) · 922 Bytes
/
webpack.demo.config.js
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
var path = require('path'),
webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
index: './src/demo/index.js'
},
output: {
path: './target/demo',
filename: '[name].js'
},
resolve: {
root: [
path.resolve(__dirname, '..'),
path.resolve(__dirname, 'node_modules')
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/demo/index.html',
minify: {collapseWhitespace: true}
}),
new ExtractTextPlugin('[name].css')
],
module: {
loaders: [
{test: /\.js$/, loader: 'babel'},
{test: /\.json$/, loader: 'hson'},
{test: /\.less$/, loader: ExtractTextPlugin.extract('style', 'css!less?strictUnits=true&strictMath=true')},
{test: /\.(png|jpg)$/, loader: 'file-loader?name=[name].[ext]'}
]
}
};