-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
"Building for Production" docs "Library Mode" section mildly broken #9147
Comments
Hello @symbioquine. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
Hi @sodatea, thanks for taking a look at this issue! I'd be happy to open a PR if we can agree on which of the strategies I've outlined above (copied below) is preferred - i.e. most in line with the direction the docs should be moving. (I don't have a opinion which is best.)
|
This should be fixed in #9121 which isn't released yet. It will use esbuild to polyfill |
🤔Though the bugs are fixed, I think we should refrain from using |
I agree too. We could probably make the change altogether for ts too since |
Describe the bug
Based on;
Expected
Library builds by copying documentation verbatim.
Actual behavior
Problem
Use of
__dirname
in the providedvite.config.js
conflicts with the subsequent recommendedpackage.json
which recommends"type": "module"
.Proposed solution
Each documentation section should be internally consistent such that a new user can follow the recommendations in that section without getting sidetracked by finding solutions to problems the docs have baked in.
Here the docs should probably do one of the following:
__dirname
when recommending use of"type": "module"
inpackage.json
"type": "module"
inpackage.json
when using__dirname
invite.config.js
vite.config.js
Related (but not duplicate) issues
Reproduction
Included in bug description
System Info
Not really relevant, but $ node --version v18.5.0 `[email protected]`
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: