-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
53 lines (51 loc) · 1.37 KB
/
Copy pathwebpack.config.js
File metadata and controls
53 lines (51 loc) · 1.37 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
44
45
46
47
48
49
50
51
52
53
var fs = require('fs')
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: {
app: ['./src/main.js']
},
output: {
path: path.join(__dirname, 'static'),
publicPath: '/static/',
filename: 'build.js'
},
module: {
loaders: [{
test: /\.js|jsx$/,
exclude: /node_modules/,
loader: 'babel?optional[]=runtime&loose=all'
}, {
test: /\.scss$/,
loader: "style!css!autoprefixer!sass"
}, {
test: /\.css$/,
loader: 'style!css!autoprefixer'
}, {
test: /\.(png|jpg)$/,
loader: 'url?limit=1000'
}]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx', '.scss'],
alias: {
// zepto: path.join(__dirname, 'src/libs/zepto/zepto.js'),
}
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'__DEV__': true,
'__TEST__': false,
'__PROD__': false,
}),
new webpack.ProvidePlugin({
"$": "npm-zepto",
"Zepto": "npm-zepto",
"window.Zepto": "npm-zepto",
"_": "underscore",
"FastClick": "fastclick",
"Daze":path.join(__dirname,'src/libs_native/native')
})
]
}