Created
December 14, 2021 12:27
-
-
Save noyobo/33bbc3ba646f4e06a1e6d7ea638d2b2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let makeAllPackagesExternalPlugin = { | |
name: 'make-all-packages-external', | |
setup(build) { | |
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../" | |
build.onResolve({ filter }, args => ({ path: args.path, external: true })) | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment