-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.dev.js
More file actions
43 lines (41 loc) · 1.32 KB
/
webpack.config.dev.js
File metadata and controls
43 lines (41 loc) · 1.32 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
42
43
var webpack = require("webpack");
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var TransferWebpackPlugin = require('transfer-webpack-plugin');
module.exports = {
devtool: 'inline-source-map',
entry: {
"homeIndex": "./assets/js/home/index.js"
},
output: {
path: './.tmp/public/',
publicPath: '/',
filename: 'js/[name].js'
},
module: {
loaders: [
{test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader')},
{test: /\.less$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!less-loader')},
{test: /\.(js|jsx)$/, loader: 'es3ify-loader!babel?compact=false',exclude: /node_modules/},
{test: /\.(png|jpg|gif)$/, loader: 'url-loader?limit=3072'}
]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx']
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
React: 'react',
EventProxy: 'eventproxy'
}),
new ExtractTextPlugin("/styles/[name].css", {
allChunks: false
}),
new TransferWebpackPlugin([
{from: 'images', to: 'images'}
], path.join(__dirname, 'assets')
)
]
}