Skip to content

fix: export webpack helper subpath#61

Open
xianzuyang9-blip wants to merge 1 commit into
Nexus-Mods:masterfrom
xianzuyang9-blip:codex/export-webpack-helper
Open

fix: export webpack helper subpath#61
xianzuyang9-blip wants to merge 1 commit into
Nexus-Mods:masterfrom
xianzuyang9-blip:codex/export-webpack-helper

Conversation

@xianzuyang9-blip

Copy link
Copy Markdown

Fixes #60.

What changed

  • Exported the packaged webpack helper at vortex-api/bin/webpack.
  • Also exported the explicit vortex-api/bin/webpack.js subpath for consumers that include the extension.

The helper is already included in the npm package via files: ["./bin", ...] and the migration guide still documents the webpack helper path, but the v2 export map only exposed the root typing entrypoint. That makes Node reject existing webpack configs with ERR_PACKAGE_PATH_NOT_EXPORTED.

Validation

Before this change, this fails with ERR_PACKAGE_PATH_NOT_EXPORTED:

node -e "require.resolve('vortex-api/bin/webpack', { paths: [process.cwd()] })"

After this change, these pass:

node -e "console.log(require.resolve('vortex-api/bin/webpack', { paths: [process.cwd()] }))"
node -e "console.log(require.resolve('vortex-api/bin/webpack.js', { paths: [process.cwd()] }))"
node -e "const webpack=require('vortex-api/bin/webpack').default; console.log(typeof webpack);"
npm pack --dry-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to build extension using webpack for latest vortex-api (v2)

1 participant