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

Question: multiple entrypoint package #390

Closed
xiaoxiangmoe opened this issue Jun 12, 2020 · 2 comments
Closed

Question: multiple entrypoint package #390

xiaoxiangmoe opened this issue Jun 12, 2020 · 2 comments

Comments

@xiaoxiangmoe
Copy link
Contributor

xiaoxiangmoe commented Jun 12, 2020

For example, package arch has two entry points: main and browser.

For this kind of package, how should we adapt vite? Should we use Nested conditions as below?

{
  "main": "./main.js",
  "exports": {
    "browser": "./feature-browser.mjs",
    "node": {
      "import": "./feature-node.mjs",
      "require": "./feature-node.cjs"
    }
  }
}
@yyx990803
Copy link
Member

Vite supports the browser field.

Conditional exports, on the other hand, is not supported because @rollup/plugin-node-resolve doesn't support it yet.

@xiaoxiangmoe
Copy link
Contributor Author

Conditional exports, on the other hand, is not supported because @rollup/plugin-node-resolve doesn't support it yet.

New message:

rollup/plugins#540

@yyx990803

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants