[🎨 Background]
-
@naverpay/pite can inject external helpers and polyfills into the build output: core-js-pure (via babel-plugin-polyfill-corejs3, usage-pure mode)
-
When injected, these must be declared in the library's dependencies so consumers can resolve them at runtime. If a library injects them but doesn't declare them, consumers hit MODULE_NOT_FOUND.
-
Example: @naverpay/hidash@1.0.0 injects require("core-js-pure/...") into 16 output files, but dependencies doesn't include core-js-pure.
[🔧 Fix]
Add a phantomDepCheck option (severity: 'error' | 'warn' | 'off', default 'error').
- After build, scans the output's
import/require specifiers and checks each against the manifest's dependencies
[🎨 Background]
@naverpay/pitecan inject external helpers and polyfills into the build output:core-js-pure(viababel-plugin-polyfill-corejs3,usage-puremode)When injected, these must be declared in the library's
dependenciesso consumers can resolve them at runtime. If a library injects them but doesn't declare them, consumers hitMODULE_NOT_FOUND.Example:
@naverpay/hidash@1.0.0injectsrequire("core-js-pure/...")into 16 output files, butdependenciesdoesn't includecore-js-pure.[🔧 Fix]
Add a
phantomDepCheckoption (severity: 'error' | 'warn' | 'off', default'error').import/requirespecifiers and checks each against the manifest's dependencies