Skip to content

Commit 0b78236

Browse files
committed
Adds demo webpack
1 parent 5def7c0 commit 0b78236

File tree

6 files changed

+3587
-0
lines changed

6 files changed

+3587
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
.idea
3+
node_modules
4+
demo/demo-dist

README.md

Whitespace-only changes.

demo/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function main () {
2+
console.log('Hi')
3+
}
4+
5+
main()

demo/webpack.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
2+
const path = require('path')
3+
4+
module.exports = function (_env) {
5+
return {
6+
entry: path.resolve(__dirname, 'index.js'),
7+
output: {
8+
path: path.resolve(__dirname, 'demo-dist'),
9+
filename: './index.js'
10+
},
11+
plugins: [
12+
new BundleAnalyzerPlugin({
13+
analyzerMode: 'disabled',
14+
generateStatsFile: true
15+
})
16+
]
17+
}
18+
}

0 commit comments

Comments
 (0)