diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-13 22:52:13 +0800 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-11-13 15:52:13 +0100 |
commit | afe50873a5d6b52177b0cd6bc9d2657faf82f311 (patch) | |
tree | 0d9fb3ef4d4ba5739c52f2fcb38ad96263346f08 /webpack.config.js | |
parent | 71395dffd0db0c53353e4b0cf0d687ece0032597 (diff) | |
download | gitea-afe50873a5d6b52177b0cd6bc9d2657faf82f311.tar.gz gitea-afe50873a5d6b52177b0cd6bc9d2657faf82f311.zip |
Move index.js to web_src and use webpack to pack them (#8598)
* Move index.js to web_src and use webpack
* Fix initHeatMap
* update eslint and move webpack to devDependencies
* update index.js
* add eslint env node
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000000..750ee4c89a --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,20 @@ +const path = require('path'); +const TerserPlugin = require('terser-webpack-plugin'); + +module.exports = { + mode: 'production', + entry: { + index: './web_src/js/index.js', + }, + devtool: 'source-map', + output: { + path: path.resolve(__dirname, 'public/js'), + filename: "[name].js" + }, + optimization: { + minimize: true, + minimizer: [new TerserPlugin({ + sourceMap: true + })], + }, +}; |