Created
January 22, 2017 11:59
-
-
Save xingoxu/9c73872db5fce038b939ce0cce1e7c01 to your computer and use it in GitHub Desktop.
simplist webpack buildjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webpack = require('webpack'); | |
| const webpackConfig = { | |
| entry: './app.js', | |
| output: { | |
| filename: 'bundle.js', | |
| path: './' | |
| }, | |
| module: { | |
| rules: [ | |
| ] | |
| }, | |
| plugins: [ | |
| // new webpack.optimize.UglifyJsPlugin({ | |
| // compress: { | |
| // warnings: false | |
| // } | |
| // }) | |
| ] | |
| } | |
| webpack(webpackConfig, function (err, stats) { | |
| if (err) throw err | |
| process.stdout.write(stats.toString({ | |
| colors: true, | |
| modules: false, | |
| children: false, | |
| chunks: false, | |
| chunkModules: false | |
| }) + '\n') | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment