-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
54 lines (52 loc) · 1.4 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
const path = require('path'),
webpack = require('webpack'),
poststylus = require('poststylus'),
HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
context: __dirname + "/app",
entry: ['babel-polyfill','./app.jsx'],
output: {
path: __dirname,
filename: "bundle.js"
},
resolve: {
// Tell webpack to look for required files in node
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.jsx', '.json', '.styl']
},
module: {
// npParse === aframe Bugfix for console warning
noParse: [
/node_modules\/aframe\/dist\/aframe-master.js/, // for aframe from NPM
/node_modules\/cannon\/build\/cannon.js/, // for aframe-extras from NPM
],
loaders: [
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'stage-0', 'react'],
}
},{
test: /\.styl$/,
loader: 'style-loader!css-loader!stylus-loader'
},{ test: /\.(png|jpg|woff|woff2|eot|ttf|svg)(\?[a-z0-9=&.]+)?$/, loader: 'url-loader?limit=100000' }
]
},
stylus: {
use: [
poststylus([ 'autoprefixer'])
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'A-Frame Curverimge Calculator',
template: __dirname + '/app/index.html',
inject: 'body',
files: {
'css': [ __dirname + '/app/style.styl']
}
})
]
};