-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 1.05 KB
/
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
var path = require('path');
var webpack = require('webpack');
module.exports = {
output: {
filename: '[name].js',
path: path.join(__dirname, 'dist')
},
resolve: {
root: [path.join(__dirname, 'app/lib'), path.join(__dirname, 'app/src')],
extensions: ['', '.js'],
alias: {
jasmine: __dirname + '/app/lib/jasmine/lib/jasmine-core/',
famous: __dirname + '/app/lib/famous/src',
'famous-flex': __dirname + '/app/lib/famous-flex/src',
'dat-gui': __dirname + '/app/lib/dat.gui.js/build/dat.gui.js'
}
},
module: {
loaders: [{
//图片加载器
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=8192'
}, {
//css加载器
test: /\.css$/,
loader: 'style-loader!css-loader'
}]
},
plugins: [
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
)
],
devtool: 'source-map'
};