Skip to content

Commit

Permalink
Downgrade terser to fix invalid minifying (#12178)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Apr 26, 2020
1 parent 6ce3c7b commit 3094016
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import chalk from 'next/dist/compiled/chalk'
import TerserPlugin from 'next/dist/compiled/terser-webpack-plugin'
import path from 'path'
import PnpWebpackPlugin from 'pnp-webpack-plugin'
import { MinifyOptions } from 'terser'
import webpack from 'webpack'
import {
DOT_NEXT_ALIAS,
Expand Down Expand Up @@ -293,7 +292,7 @@ export default async function getBaseWebpackConfig(

const webpackMode = dev ? 'development' : 'production'

const terserOptions: MinifyOptions = {
const terserOptions: any = {
parse: {
ecma: 8,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/next/compiled/terser/bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"string-hash": "1.1.3",
"strip-ansi": "6.0.0",
"taskr": "1.1.0",
"terser": "4.6.11",
"terser": "4.4.2",
"terser-webpack-plugin": "gist:1b826e8b64f73158df99990d1b4624fa",
"text-table": "0.2.0",
"thread-loader": "2.1.3",
Expand Down
17 changes: 13 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15957,10 +15957,10 @@ terser-webpack-plugin@^1.4.3:
terser "^4.4.3"
webpack-sources "^1.4.3"

terser@4.6.11, terser@^4.1.2, terser@^4.3.9, terser@^4.4.3:
version "4.6.11"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f"
integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA==
terser@4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.2.tgz#448fffad0245f4c8a277ce89788b458bfd7706e8"
integrity sha512-Uufrsvhj9O1ikwgITGsZ5EZS6qPokUOkCegS7fYOdGTv+OA90vndUbU6PEjr5ePqHfNUbGyMO7xyIZv2MhsALQ==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
Expand All @@ -15984,6 +15984,15 @@ terser@^3.8.2:
source-map "~0.6.1"
source-map-support "~0.5.10"

terser@^4.1.2, terser@^4.3.9, terser@^4.4.3:
version "4.6.11"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f"
integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.12"

test-exclude@^5.2.3:
version "5.2.3"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0"
Expand Down

0 comments on commit 3094016

Please sign in to comment.