-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (36 loc) · 929 Bytes
/
webpack.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
37
const path = require('path');
const webpack = require('webpack');
module.exports = {
cache: true,
entry: {
index: path.join(__dirname, 'js/main.js'),
projects: path.join(__dirname, 'js/projects-main.js')
},
output: {
filename: '[name].build.js',
publicPath: '/',
path: path.join(__dirname, 'js')
},
watchOptions: {
poll: true
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loaders: ['babel-loader']
},
{
test: /\.less$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!less-loader'
}
]
},
devtool: 'cheap-module-eval-source-map',
plugins: [
new webpack.ProvidePlugin({
$: "jquery"
})
]
};