diff --git a/package.json b/package.json index cb5a9491..52a51cad 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "react-dom": "^17.0.1", "rimraf": "^3.0.2", "rollup": "^2.35.1", + "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-sourcemaps": "^0.6.3", "ts-jest": "^26.4.4", "ts-node": "^9.1.1", diff --git a/rollup.config.js b/rollup.config.js index 16866d74..fcc2226d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,9 @@ import babel from '@rollup/plugin-babel' import commonjs from '@rollup/plugin-commonjs' import resolve from '@rollup/plugin-node-resolve' +import peerDepsExternal from 'rollup-plugin-peer-deps-external' import sourceMaps from 'rollup-plugin-sourcemaps' + import pkg from './package.json' const extensions = ['.js', '.jsx', '.ts', '.tsx'] @@ -14,6 +16,7 @@ export default { { file: pkg.module, format: 'es', sourcemap: true }, ], plugins: [ + peerDepsExternal(), resolve({ extensions }), commonjs(), babel({ diff --git a/yarn.lock b/yarn.lock index 1c7d9b86..f6bc9a4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5839,6 +5839,11 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +rollup-plugin-peer-deps-external@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz#8a420bbfd6dccc30aeb68c9bf57011f2f109570d" + integrity sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g== + rollup-plugin-sourcemaps@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"