Describe the problem
I have a sveltekit app that requires a package in a monorepo, my-mono-repo-package. That package specifies a bunch of it's own node dependencies. I'm bundling with adapter-node and placed my-mono-repo-package in package.json['dependencies'] to ensure that rollup externalizes the package...
// package.json in sveltekit app
{
"name": "my-website",
"private": true,
"type": "module",
"dependencies": {
"my-mono-repo-package": "file:../package",
}
}
While node-adapter externalizes my-mono-repo-package, it still bundles the dependencies of my-mono-repo-package.
Describe the proposed solution
I figure rollup does this because my-mono-repo-package isn't in node_modules and I haven't explicitly externalized all the dependencies of my-mono-repo-package. It would be awesome if node-adapter/(rollup?) could automatically externalize dependencies of monorepo packages. But perhaps we can expose an option to pass custom externals to adapter-node?
Alternatives considered
At the moment, I'm working around this bug by listing all dependencies of my-mono-repo-package in the the package.json of my-website.
// package.json in sveltekit app
{
"name": "my-website",
"private": true,
"type": "module",
"dependencies": {
"my-mono-repo-package": "file:../package",
"my-mono-repo-package-depedency-1": "*",
"my-mono-repo-package-depedency-2": "*"
}
}
It's a little funky and very verbose, but it unblocks me for now.
Importance
would make my life easier
Additional Information
No response
Describe the problem
I have a sveltekit app that requires a package in a monorepo,
my-mono-repo-package. That package specifies a bunch of it's own node dependencies. I'm bundling withadapter-nodeand placedmy-mono-repo-packagein package.json['dependencies'] to ensure that rollup externalizes the package...While
node-adapterexternalizesmy-mono-repo-package, it still bundles the dependencies ofmy-mono-repo-package.Describe the proposed solution
I figure rollup does this because
my-mono-repo-packageisn't in node_modules and I haven't explicitly externalized all the dependencies ofmy-mono-repo-package. It would be awesome if node-adapter/(rollup?) could automatically externalize dependencies of monorepo packages. But perhaps we can expose an option to pass custom externals to adapter-node?Alternatives considered
At the moment, I'm working around this bug by listing all dependencies of
my-mono-repo-packagein the the package.json ofmy-website.It's a little funky and very verbose, but it unblocks me for now.
Importance
would make my life easier
Additional Information
No response