Skip to content
Permalink
Browse files

chore: user terser

  • Loading branch information...
tannerlinsley committed Oct 2, 2019
1 parent 3de1bbc commit 3f9ba8dabae6014a458a2e4be91f8c9e98f27be2
Showing with 34 additions and 29 deletions.
  1. +1 −1 package.json
  2. +3 −16 rollup.config.js
  3. +30 −12 yarn.lock
@@ -91,7 +91,7 @@
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-uglify": "^6.0.2",
"rollup-plugin-terser": "^5.1.2",
"snapshot-diff": "^0.5.2"
},
"config": {
@@ -2,7 +2,7 @@ import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import external from 'rollup-plugin-peer-deps-external'
import resolve from 'rollup-plugin-node-resolve'
import { uglify } from 'rollup-plugin-uglify'
import { terser } from 'rollup-plugin-terser'

import pkg from './package.json'

@@ -14,28 +14,15 @@ export default [
format: 'cjs',
sourcemap: true,
},
plugins: [
external(),
babel({
exclude: 'node_modules/**',
}),
resolve(),
commonjs(),
uglify(),
],
plugins: [external(), babel(), resolve(), commonjs(), terser()],
},
{
input: 'src/index.js',
external: Object.keys(pkg.peerDependencies),
output: {
file: pkg.module,
format: 'es',
sourcemap: true,
},
plugins: [
babel({
exclude: ['/**/node_modules/**'],
}),
],
plugins: [external(), babel()],
},
]
@@ -6878,15 +6878,16 @@ rollup-plugin-peer-deps-external@^2.2.0:
resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.0.tgz#99ef9231aa01736f3e9605b7c3084a0d627f665b"
integrity sha512-BmJMHUWQcvjS2dQMwJ7dzvdbwpRChnq4AYk2sTU/4aySt9Kumk8y8W3HhTHss31wxzKb0AC/wsiX1AqDcOBIEA==

rollup-plugin-uglify@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz#681042cfdf7ea4e514971946344e1a95bc2772fe"
integrity sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw==
rollup-plugin-terser@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.1.2.tgz#3e41256205cb75f196fc70d4634227d1002c255c"
integrity sha512-sWKBCOS+vUkRtHtEiJPAf+WnBqk/C402fBD9AVHxSIXMqjsY7MnYWKYEUqGixtr0c8+1DjzUEPlNgOYQPVrS1g==
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^24.0.0"
serialize-javascript "^1.6.1"
uglify-js "^3.4.9"
jest-worker "^24.6.0"
rollup-pluginutils "^2.8.1"
serialize-javascript "^1.7.0"
terser "^4.1.0"

rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1:
version "2.8.1"
@@ -7014,10 +7015,10 @@ semver@^6.0.0, semver@^6.1.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

serialize-javascript@^1.6.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65"
integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==
serialize-javascript@^1.7.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb"
integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==

set-blocking@^2.0.0, set-blocking@~2.0.0:
version "2.0.0"
@@ -7187,6 +7188,14 @@ source-map-support@^0.5.6:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-support@~0.5.12:
version "0.5.13"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
@@ -7503,6 +7512,15 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.3"

terser@^4.1.0:
version "4.3.4"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.4.tgz#ad91bade95619e3434685d69efa621a5af5f877d"
integrity sha512-Kcrn3RiW8NtHBP0ssOAzwa2MsIRQ8lJWiBG/K7JgqPlomA3mtb2DEmp4/hrUA+Jujx+WZ02zqd7GYD+QRBB/2Q==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.12"

test-exclude@^4.2.1:
version "4.2.3"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20"
@@ -7678,7 +7696,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

uglify-js@^3.1.4, uglify-js@^3.4.9:
uglify-js@^3.1.4:
version "3.6.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==

0 comments on commit 3f9ba8d

Please sign in to comment.
You can’t perform that action at this time.