Merge pull request #254 from yoni-rapoport/master

Support subpath imports from externalized dependencies
This commit is contained in:
alex.wei 2023-08-17 23:58:43 +08:00 committed by GitHub
commit 8a774ef76d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ export function externalizeDepsPlugin(options: ExternalOptions = {}): Plugin | n
const defaultConfig = { const defaultConfig = {
build: { build: {
rollupOptions: { rollupOptions: {
external: [...new Set(deps)] external: [...new Set(deps.map(d => new RegExp(`^${d}\/?.*`)))]
} }
} }
} }