Skip to content

Commit 7e9d80d

Browse files
committed
Webpackbar and common config
1 parent 350bba5 commit 7e9d80d

File tree

8 files changed

+289
-122
lines changed

8 files changed

+289
-122
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
WebpackBar=require "webpackbar"
3+
4+
module.exports=
5+
entry: './js/index.js'
6+
output:
7+
path: "#{__dirname}/public"
8+
filename: 'bundle.js'
9+
performance:
10+
maxEntrypointSize: 1.5e6
11+
maxAssetSize: 1.5e6
12+
module:
13+
rules: [
14+
{
15+
loader: "worker-loader"
16+
test: /\.worker\.js$/
17+
options:
18+
filename: "[contenthash].js"
19+
}
20+
]
21+
plugins:[
22+
new WebpackBar()
23+
]

coffee/client/webpack.dev.coffee

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
11

2-
buildPath="#{__dirname}/public"
3-
4-
module.exports=(env)->
2+
merge=require "webpack-merge"
3+
common=require "./webpack.common.js"
4+
module.exports=merge.merge common,
55
mode: "development"
66
entry: './js/index.js'
7-
output:
8-
path: buildPath
9-
filename: 'bundle.js'
10-
performance:
11-
maxEntrypointSize: 1.5e6
12-
maxAssetSize: 1.5e6
13-
stats:
14-
modules: false
15-
devtool: 'cheap-source-map'
7+
devtool: 'inline-source-map'
168
devServer:
17-
contentBase: buildPath
18-
inline: true
19-
host: "0.0.0.0"
20-
stats: "minimal"
9+
contentBase: "#{__dirname}/public"
2110
port: 8080
22-
module:
23-
rules: [
24-
{
25-
loader: "worker-loader"
26-
test: /\.worker\.js$/
27-
options:
28-
filename: "[contenthash].js"
29-
}
30-
]

coffee/client/webpack.prod.coffee

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11

2-
buildPath="#{__dirname}/public"
2+
merge=require "webpack-merge"
3+
common=require "./webpack.common.js"
34

4-
module.exports=(env)->
5+
module.exports=merge.merge common,
56
mode: "production"
6-
entry: './js/index.js'
7-
output:
8-
path: buildPath
9-
filename: 'bundle.js'
10-
performance:
11-
maxEntrypointSize: 1.5e6
12-
maxAssetSize: 1.5e6
13-
stats:
14-
modules: false
15-
devtool: 'source-map'
16-
module:
17-
rules: [
18-
{
19-
loader: "worker-loader"
20-
test: /\.worker\.js$/
21-
options:
22-
filename: "[contenthash].js"
23-
}
24-
]

package-lock.json

Lines changed: 203 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)