From b67379c99b9c1efdeabe9f97ba3c5bd2ca8c25e9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 19 Feb 2021 01:04:59 -0800 Subject: [PATCH] chore #222 - Optimize build Closes #222 --- package-lock.json | 59 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 3 ++- rollup.config.ts | 16 +++++++++++-- 3 files changed, 74 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c5a0b453..94a27e9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@dassana-io/web-components", - "version": "0.8.9", + "version": "0.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -27413,6 +27413,63 @@ } } }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "terser": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.6.0.tgz", + "integrity": "sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + } + } + } + }, "rollup-plugin-typescript2": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.28.0.tgz", diff --git a/package.json b/package.json index 82870481..a9afd1e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dassana-io/web-components", - "version": "0.9.0", + "version": "0.9.1", "publishConfig": { "registry": "https://npm.pkg.github.com/dassana-io" }, @@ -106,6 +106,7 @@ "react-test-renderer": "^16.14.0", "rollup": "^2.32.1", "rollup-plugin-styles": "^3.11.0", + "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.28.0" }, "peerDependencies": { diff --git a/rollup.config.ts b/rollup.config.ts index 9d2af791..2d044455 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -6,6 +6,7 @@ import pkg from './package.json' import resolve from '@rollup/plugin-node-resolve' import styles from 'rollup-plugin-styles' import svgr from '@svgr/rollup' +import { terser } from 'rollup-plugin-terser' import typescript from 'rollup-plugin-typescript2' const assetFileNames = '[name]-[hash][extname]' @@ -29,14 +30,24 @@ const rootImport = options => ({ export default { external: [ - 'antd', '@ant-design/icons', + '@dassana-io/web-utils', '@fortawesome/fontawesome-svg-core', '@fortawesome/free-solid-svg-icons', '@fortawesome/react-fontawesome', + 'antd', + 'bytes', + 'classnames', + 'color', + 'framer-motion', 'fuse.js', + 'lodash', 'moment', 'react', + 'react-dom', + 'react-hook-form', + 'react-jss', + 'typescript', 'uuid' ], input: 'src/components/index.ts', @@ -64,6 +75,7 @@ export default { typescript({ tsconfig: 'tsconfig.rollup.json', useTsconfigDeclarationDir: true - }) + }), + terser() ] }