-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
47 lines (46 loc) · 1.43 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
var path = require("path");
var autoprefixer = require('autoprefixer');
var precss = require('precss');
var cssnext = require('postcss-cssnext');
module.exports = {
entry: "./wwwroot/js/main.jsx",
output: {
path: './wwwroot/dist',
filename: "bundle.js",
},
devServer: {
inline: true,
port: 3333,
contentBase: './wwwroot/dist',
historyApiFallback: true
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.(js|jsx)?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015', 'react', 'stage-2']
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader!postcss-loader"
},
{test: /\.(woff|woff2)$/, loader: "url?limit=10000&minetype=application/font-woff"},
{test: /\.ttf$/, loader: "url?limit=10000&mimetype=application/octet-stream"},
{test: /\.eot$/, loader: "file"},
{test: /\.svg$/, loader: "url?limit=10000&mimetype=image/svg+xml"},
{test: /\.png$/, loader: "url?limit=10000&mimetype=image/png"}
]
},
postcss: function () {
return [precss, autoprefixer, cssnext];
},
resolve: {
root: path.resolve('./wwwroot'),
extensions: ['', '.js', '.jsx']
}
};