Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configurable chunk path prefix #733

Closed
ggoodman opened this issue Feb 1, 2021 · 2 comments
Closed

Support configurable chunk path prefix #733

ggoodman opened this issue Feb 1, 2021 · 2 comments

Comments

@ggoodman
Copy link

ggoodman commented Feb 1, 2021

Given a configuration like this:

{
  bundle: true,
  entrypoints: ['./src/A/index.ts', './src/B/index.ts'],
  format: 'esm',
  outdir: './dist',
  outbase: './src',
  splitting: true,
}

The resulting build might look like this:

dist
  A
    index.js
  B
    index.js
  chunk.1.js
  chunk.2.js

If a package.json is put in that directory and it is used as the basis of producing an npm module called my-module, tooling like the TypeScript language server will complete import {} from 'my-module/ with a dialogue showing all of the chunks intermingle with the legitimate sub-packages (at least until it starts respecting the "exports" field in the package.json).

It would be helpful to have a measure of control over where the chunks get placed to prevent them from polluting completion in this way. It's a minor thing but perhaps a bit of feedback that might be helpful in your planned code-splitting refactor.

@evanw
Copy link
Owner

evanw commented Feb 3, 2021

Closing as a duplicate of #553 and #187.

@evanw evanw closed this as completed Feb 3, 2021
@evanw
Copy link
Owner

evanw commented Feb 26, 2021

FYI this is being implemented ahead of #553. See #888 and the release notes for more information.

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

No branches or pull requests

2 participants