Support subpath imports from externalized dependencies
Using an array of regular expressions for rollupOptions.external, I've fixed an issue causing subpath imports or external dependencies (e.g. import {} from 'pkg/subpath') to be bundled.
This commit is contained in:
parent
5c440a8a76
commit
27acfb7c1d
|
@ -33,7 +33,7 @@ export function externalizeDepsPlugin(options: ExternalOptions = {}): Plugin | n
|
|||
const defaultConfig = {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
external: [...new Set(deps)]
|
||||
external: [...new Set(deps.map(d => new RegExp(`^${d}\/?.*`)))]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue