Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ object Deps {
val juration = "juration" -> "0.1.0"

val webpackDependencies =
"webpack-closure-compiler" -> "git://github.com/roman01la/webpack-closure-compiler.git#3677e5e" :: //TODO: "closure-webpack-plugin" -> "1.0.1" :: https://github.com/webpack-contrib/closure-webpack-plugin/issues/47
"closure-webpack-plugin" -> "2.0.1" ::
"google-closure-compiler" -> "v20190528.1.0" ::
// "webpack-subresource-integrity" -> "1.1.0-rc.4" ::
"html-webpack-plugin" -> "3.2.0" ::
"html-webpack-include-assets-plugin" -> "1.0.7" ::
Expand Down
29 changes: 12 additions & 17 deletions webApp/webpack/webpack.base.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const CleanPlugin = require("clean-webpack-plugin");
const CompressionPlugin = require("compression-webpack-plugin");
const zopfli = require("@gfx/zopfli");
const BrotliPlugin = require('brotli-webpack-plugin');
const ClosureCompilerPlugin = require("webpack-closure-compiler");
const ClosurePlugin = require('closure-webpack-plugin');
// const SriPlugin = require("webpack-subresource-integrity");
const HtmlPlugin = require("html-webpack-plugin");
const HtmlIncludeAssetsPlugin = require("html-webpack-include-assets-plugin");
Expand Down Expand Up @@ -65,25 +65,20 @@ module.exports.plugins.push(new CleanPlugin([ module.exports.output.path ]));
////////////////////////////////////////
// closure compiler
////////////////////////////////////////
// https://github.com/google/closure-compiler-js#webpack
// https://github.com/webpack-contrib/closure-webpack-plugin
// process.env._JAVA_OPTIONS = "-Xms128M -Xmx800M";
module.exports.optimization = {
minimize: false // disable default uglifyJs
minimizer: [
new ClosurePlugin({
platform: "java",
mode: 'STANDARD'
}, {
// compiler flags here
languageOut: 'ECMASCRIPT_2015'
})
]
};

process.env._JAVA_OPTIONS = "-Xms128M -Xmx800M";
module.exports.plugins.push(new ClosureCompilerPlugin({
compiler: {
language_in: 'ECMASCRIPT6',
language_out: 'ECMASCRIPT5',
compilation_level: 'SIMPLE', //TODO: ADVANCED
// process_common_js_modules: true,
// jscomp_off: 'checkVars',
warning_level: 'DEFAULT',
create_source_map: (process.env.SOURCEMAPS == 'true')
},
concurrency: 1
}));

////////////////////////////////////////
// html template generate index.html
////////////////////////////////////////
Expand Down