-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
61 lines (59 loc) · 1.49 KB
/
webpack.config.js
File metadata and controls
61 lines (59 loc) · 1.49 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
54
55
56
57
58
59
60
61
var webpack = require('webpack'),
path = require('path');
console.log(path.join(__dirname, '/node_modules/handlebars/dist/handlebars.runtime.js'));
module.exports = {
cache: false,
entry: {
engine: ['webpack/hot/dev-server', './scripts/BannerEngine.js']
},
output: {
path: path.join(__dirname, "build/js"),
filename: "[name].js"
},
node: {
fs: "empty",
net: "empty",
dns: "empty"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015-loose', 'stage-2', 'stage-3'],
//plugins: ["syntax-async-functions","transform-regenerator"]
plugins: [
["transform-strict-mode", {
"strict": false
}],
"es6-promise"
//["transform-es2015-classes", {
// "loose": true
//}]
]
//optional: ['es7.asyncFunctions'],
//stage: 0
}
},
{
test: /\.hbs$/,
exclude: /node_modules/,
loader: "handlebars-loader",
query: {
helperDirs: [__dirname + 'scripts/helpers'],
knownHelpers: ['add', 'sub', 'for', 'concat', 'log', 'route', 'routeParam', 'getText', 'getTextConcat', 'ifNot', 'ifCond', 'nl2br', 'dotdotdot', 'testIf', 'formatRelative', 'formatDate', 'today', 'formatNumber', 'formatTime', 'content', 'extend']
}
}
]
},
resolve: {
root: path.resolve(__dirname, 'scripts'),
modulesDirectories: [
'node_modules'
]
},
plugins: [new webpack.HotModuleReplacementPlugin()],
devtool: 'inline-source-map'
};