Open brightsider opened 2 years ago
agreed, would love that!
I got this working with Rollup 3.x, see https://github.com/chrisn/rollup-plugin-peer-deps-external/ - also available in NPM at https://www.npmjs.com/package/@chrisneedham/rollup-plugin-peer-deps-external.
@pmowrer You're welcome to take the changes I made to publish your own update.
I also had a problem during migration, and to be honest, this plugin isn't necessary anymore with import attributes:
import packageJson from './package.json' with { type: 'json'};
import { defineConfig } from "rollup";
const peerDependencies = Object.keys(packageJson.peerDependencies)
export default defineConfig([
{
input: "./source/code/index.ts",
external: [
...peerDependencies
],
},
]);
Update for rollup 3.0 pls