Skip to content

Commit

Permalink
Revert "Removed Google Closure compiler because it's failing"
Browse files Browse the repository at this point in the history
This reverts commit 4594e0e.
We are unable to make use of the other parsers, so unminifying
the python parser does not benefit us. It slows down load speeds.
  • Loading branch information
Hopding committed May 30, 2017
1 parent f806cb7 commit efe95bb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ const prepare_lang = async function(filename) {
// Tell webpack that fs will be external so it doesn't complain.
'externals': ['fs'],

'plugins': [
// Run the Google Closure Compiler if env.optimize is set
optimize ? new ClosureCompilerPlugin({
'compiler': {
'language_in': 'ECMASCRIPT6',
'language_out': 'ECMASCRIPT5',
'compilation_level': 'SIMPLE_OPTIMIZATIONS',
/*
There is a higher compilation level, ADVANCED_OPTIMIZATIONS.
Unfortunately, it requires property access by string or key to be consistent.
For example, obj.abc = 123; alert(obj['abc']); doesn't work.
Antlr does not follow this principle, so as far as I can see, we won't be able to use this level.
*/
},
'concurrency': 10,
}) : undefined,
].filter(Boolean),

'output': {
// The output filename
'filename': lang_name + (optimize ? '.min.js' : '.js'),
Expand Down

0 comments on commit efe95bb

Please sign in to comment.