From 4c05da89c00c7c2355e301404286ac9c202d2540 Mon Sep 17 00:00:00 2001 From: Jungle Date: Sat, 4 Jul 2020 09:05:51 +0500 Subject: [PATCH] build(rollup-plugin-commonjs): Fix the bug: `Error: "[name] is not exported by [module]"` --- packages/app/package.json | 4 +- packages/app/rollup.config.js | 2 +- pnpm-lock.yaml | 137 ++++++++++++++++++++++++++++++---- 3 files changed, 127 insertions(+), 16 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index 7261cec..2bcb93e 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -4,14 +4,14 @@ "version": "1.0.0", "devDependencies": { "@pyoner/svelte-ts-preprocess": "1.2.1", - "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@wessberg/rollup-plugin-ts": "^1.2.25", "npm-run-all": "^4.1.5", "pretty-quick": "^2.0.1", - "rollup": "^1.29.0", + "rollup": "2.18.2", "rollup-plugin-analyzer": "^3.2.2", + "rollup-plugin-commonjs": "9.3.4", "rollup-plugin-livereload": "^1.0.4", "rollup-plugin-svelte": "^5.1.1", "rollup-plugin-terser": "^5.2.0", diff --git a/packages/app/rollup.config.js b/packages/app/rollup.config.js index 0549bf9..2e6ff98 100644 --- a/packages/app/rollup.config.js +++ b/packages/app/rollup.config.js @@ -1,6 +1,6 @@ import svelte from "rollup-plugin-svelte"; import resolve from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; +import commonjs from "rollup-plugin-commonjs"; import json from "@rollup/plugin-json"; import livereload from "rollup-plugin-livereload"; import { terser } from "rollup-plugin-terser"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92ab126..8588dfb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,32 +17,32 @@ importers: ajv: 6.12.2 devDependencies: '@pyoner/svelte-ts-preprocess': 1.2.1 - '@rollup/plugin-commonjs': 11.1.0_rollup@1.32.1 - '@rollup/plugin-json': 4.1.0_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@wessberg/rollup-plugin-ts': 1.2.25_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@2.18.2 + '@rollup/plugin-node-resolve': 7.1.3_rollup@2.18.2 + '@wessberg/rollup-plugin-ts': 1.2.25_rollup@2.18.2 npm-run-all: 4.1.5 pretty-quick: 2.0.1 - rollup: 1.32.1 + rollup: 2.18.2 rollup-plugin-analyzer: 3.2.3 + rollup-plugin-commonjs: 9.3.4_rollup@2.18.2 rollup-plugin-livereload: 1.3.0 - rollup-plugin-svelte: 5.2.2_rollup@1.32.1+svelte@3.23.2 - rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-svelte: 5.2.2_rollup@2.18.2+svelte@3.23.2 + rollup-plugin-terser: 5.3.0_rollup@2.18.2 sirv-cli: 0.4.6 svelte: 3.23.2 specifiers: '@pyoner/svelte-form': 'workspace:^0.2.0' '@pyoner/svelte-form-ajv': 'workspace:^0.1.0' '@pyoner/svelte-ts-preprocess': 1.2.1 - '@rollup/plugin-commonjs': ^11.0.2 '@rollup/plugin-json': ^4.0.2 '@rollup/plugin-node-resolve': ^7.1.1 '@wessberg/rollup-plugin-ts': ^1.2.25 ajv: ^6.12.0 npm-run-all: ^4.1.5 pretty-quick: ^2.0.1 - rollup: ^1.29.0 + rollup: 2.18.2 rollup-plugin-analyzer: ^3.2.2 + rollup-plugin-commonjs: 9.3.4 rollup-plugin-livereload: ^1.0.4 rollup-plugin-svelte: ^5.1.1 rollup-plugin-terser: ^5.2.0 @@ -1826,6 +1826,15 @@ packages: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== + /@rollup/plugin-json/4.1.0_rollup@2.18.2: + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.18.2 + rollup: 2.18.2 + dev: true + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + resolution: + integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== /@rollup/plugin-node-resolve/7.1.3_rollup@1.32.1: dependencies: '@rollup/pluginutils': 3.1.0_rollup@1.32.1 @@ -1841,6 +1850,21 @@ packages: rollup: ^1.20.0||^2.0.0 resolution: integrity: sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q== + /@rollup/plugin-node-resolve/7.1.3_rollup@2.18.2: + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.18.2 + '@types/resolve': 0.0.8 + builtin-modules: 3.1.0 + is-module: 1.0.0 + resolve: 1.17.0 + rollup: 2.18.2 + dev: true + engines: + node: '>= 8.0.0' + peerDependencies: + rollup: ^1.20.0||^2.0.0 + resolution: + integrity: sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q== /@rollup/pluginutils/3.1.0: dependencies: '@types/estree': 0.0.39 @@ -1866,6 +1890,19 @@ packages: rollup: ^1.20.0||^2.0.0 resolution: integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + /@rollup/pluginutils/3.1.0_rollup@2.18.2: + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.2.2 + rollup: 2.18.2 + dev: true + engines: + node: '>= 8.0.0' + peerDependencies: + rollup: ^1.20.0||^2.0.0 + resolution: + integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== /@samverschueren/stream-to-observable/0.3.0: dependencies: any-observable: 0.3.0 @@ -2109,6 +2146,10 @@ packages: dev: true resolution: integrity: sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g== + /@types/estree/0.0.45: + dev: true + resolution: + integrity: sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== /@types/glob/7.1.2: dependencies: '@types/minimatch': 3.0.3 @@ -2163,6 +2204,10 @@ packages: dev: true resolution: integrity: sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA== + /@types/node/14.0.14: + dev: true + resolution: + integrity: sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ== /@types/normalize-package-data/2.4.0: dev: true resolution: @@ -2266,6 +2311,37 @@ packages: typescript: '>= 3.x' resolution: integrity: sha512-tzxkXLLLj8OfcN7KUmB/Rkslitg3w7QxfRU9rS4yLnKh4BvI8a2YtHvLRbZUTWe0RaKG5BjgGSTDbAZ9rHXVLA== + /@wessberg/rollup-plugin-ts/1.2.25_rollup@2.18.2: + dependencies: + '@babel/core': 7.10.2 + '@babel/plugin-proposal-async-generator-functions': 7.10.1_@babel+core@7.10.2 + '@babel/plugin-proposal-json-strings': 7.10.1_@babel+core@7.10.2 + '@babel/plugin-proposal-object-rest-spread': 7.10.1_@babel+core@7.10.2 + '@babel/plugin-proposal-optional-catch-binding': 7.10.1_@babel+core@7.10.2 + '@babel/plugin-proposal-unicode-property-regex': 7.10.1_@babel+core@7.10.2 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.10.2 + '@babel/plugin-transform-runtime': 7.10.1_@babel+core@7.10.2 + '@babel/preset-env': 7.10.2_@babel+core@7.10.2 + '@babel/runtime': 7.10.2 + '@rollup/pluginutils': 3.1.0_rollup@2.18.2 + '@types/babel__core': 7.1.8 + '@wessberg/browserslist-generator': 1.0.36 + '@wessberg/stringutil': 1.0.19 + '@wessberg/ts-clone-node': 0.3.8 + browserslist: 4.12.0 + chalk: 4.1.0 + magic-string: 0.25.7 + rollup: 2.18.2 + slash: 3.0.0 + tslib: 2.0.0 + dev: true + engines: + node: '>=8.0.0' + peerDependencies: + rollup: '>=1.x' + typescript: '>= 3.x' + resolution: + integrity: sha512-tzxkXLLLj8OfcN7KUmB/Rkslitg3w7QxfRU9rS4yLnKh4BvI8a2YtHvLRbZUTWe0RaKG5BjgGSTDbAZ9rHXVLA== /@wessberg/rollup-plugin-ts/1.2.25_typescript@3.9.5: dependencies: '@babel/core': 7.10.2 @@ -9299,6 +9375,19 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-Oq5GtofTCIGhW4mDNtnxH106gvPKQcdAKTLujWekAiLiTmstXX9Fmye7uMG7NaZVBHgKPPsIWCtPj04ci/YXmg== + /rollup-plugin-commonjs/9.3.4_rollup@2.18.2: + dependencies: + estree-walker: 0.6.1 + magic-string: 0.25.7 + resolve: 1.17.0 + rollup: 2.18.2 + rollup-pluginutils: 2.8.2 + deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs. + dev: true + peerDependencies: + rollup: '>=0.56.0' + resolution: + integrity: sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w== /rollup-plugin-livereload/1.3.0: dependencies: livereload: 0.9.1 @@ -9345,11 +9434,24 @@ packages: svelte: '*' resolution: integrity: sha512-I+TJ2T+VLKGbKQcpeMJ4AR2ciROqTZNjxbiMiH4Cn1yByaB9OEuy3CnrgHHuWatQcPuF3yIViyKX7OlETWDKOQ== - /rollup-plugin-terser/5.3.0_rollup@1.32.1: + /rollup-plugin-svelte/5.2.2_rollup@2.18.2+svelte@3.23.2: + dependencies: + require-relative: 0.8.7 + rollup: 2.18.2 + rollup-pluginutils: 2.8.2 + sourcemap-codec: 1.4.8 + svelte: 3.23.2 + dev: true + peerDependencies: + rollup: '>=0.60.0' + svelte: '*' + resolution: + integrity: sha512-I+TJ2T+VLKGbKQcpeMJ4AR2ciROqTZNjxbiMiH4Cn1yByaB9OEuy3CnrgHHuWatQcPuF3yIViyKX7OlETWDKOQ== + /rollup-plugin-terser/5.3.0_rollup@2.18.2: dependencies: '@babel/code-frame': 7.10.1 jest-worker: 24.9.0 - rollup: 1.32.1 + rollup: 2.18.2 rollup-pluginutils: 2.8.2 serialize-javascript: 2.1.2 terser: 4.7.0 @@ -9366,13 +9468,22 @@ packages: integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== /rollup/1.32.1: dependencies: - '@types/estree': 0.0.44 - '@types/node': 10.17.26 + '@types/estree': 0.0.45 + '@types/node': 14.0.14 acorn: 7.3.1 dev: true hasBin: true resolution: integrity: sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A== + /rollup/2.18.2: + dev: true + engines: + node: '>=10.0.0' + hasBin: true + optionalDependencies: + fsevents: 2.1.3 + resolution: + integrity: sha512-+mzyZhL9ZyLB3eHBISxRNTep9Z2qCuwXzAYkUbFyz7yNKaKH03MFKeiGOS1nv2uvPgDb4ASKv+FiS5mC4h5IFQ== /rsvp/3.6.2: dev: true engines: