-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
50 lines (49 loc) · 1.46 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* Created by vajoylan on 2015/11/13.
*/
var path = require('path');
var webpack = require('webpack');
module.exports = {
//plugins: [
// new webpack.ProvidePlugin({
// 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
// })
//],
entry: {
index : ['reflect-metadata', './src/js/page/index.js']
//demo1 : ['core-js/fn/array', 'reflect-metadata', './src/js/page/demo1.js']
},
//����ļ��������
output: {
path: 'dist/js/page',
publicPath: "dist/js/page/",
filename: '[name].js'
},
//devtool: 'eval-source-map',
module: {
//����������
loaders: [
{
test: /\.js$/,
include: [
path.resolve(__dirname, "src")
],
exclude: path.resolve(__dirname, "node_modules"),
loader: "babel",
query: {
plugins: ["transform-decorators-legacy"],
presets: ['es2015', "stage-0"]
}
},
{ test: /\.scss$/, loader: 'style!css!sass'},
//{ test: /\.scss$/, loader: 'style!css!sass?sourceMap'},
{
test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'
}
]
},
resolve: {
root: path.resolve(__dirname, "src"),
extensions: ['', '.js', '.json', '.scss']
}
};