-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
59 lines (55 loc) · 1.47 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
51
52
53
54
55
56
57
58
59
var webpack = require("webpack");
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './entry.jsx',
devtool: 'source-map',
module: {
loaders: [
{
test: /\.(jsx|js)$/,
loader: 'babel',
exclude: /node_modules/,
babelrc:false,
query: {
presets: ['es2015', 'stage-0', 'react'],
}
},
{
test: /\/node_modules\/three\/.*js$/,
loader: 'babel',
babelrc:false,
query: {
presets: ['es2015', 'stage-0', 'react'],
}
},
{test: /\.scss$/, loaders: ['style','css?-minimize', 'postcss', 'sass'] },
{test: /\.(woff|woff2)$/, loader: "url-loader"},
{test: /\.ttf$/, loader: "url-loader"},
{test: /\.jpe?g$/, loaders: ['url'] },
{test: /\.eot$/, loader: "file-loader"},
{test: /\.svg$/, loader: "file-loader"},
{test: /\.glsl$/, loader: "raw"},
{test: /\.json$/, loader: "json"},
{
test: /\.styl/,
// loader: 'css-loader!stylus-loader'
loaders: [
'style',
'css?modules&importLoaders=2&localIdentName=[name]__[local]__[hash:base64:6]',
'stylus'
]
}
]
},
plugins: [
new webpack.ProvidePlugin({$: "jquery", jQuery: "jquery"}),
],
devServer: {
headers: { "Access-Control-Allow-Origin": "*" }
},
output: {
path: __dirname + '/build/app/',
publicPath: "/app/",
filename: 'application.js',
}
};