Skip to content

docs: update cjs usage in readme file#453

Merged
userquin merged 4 commits intomainfrom
userquin/docs-update-cjs-usage
Dec 3, 2023
Merged

docs: update cjs usage in readme file#453
userquin merged 4 commits intomainfrom
userquin/docs-update-cjs-usage

Conversation

@userquin
Copy link
Member

@userquin userquin commented Dec 2, 2023

Description

This PR includes the breaking changes introduced in v0.17.0 about CJS default exports:

  • webpack
  • rspack (no idea if will resolve default export export.__esModule=true, I need to do a test)
  • esbuild (no idea if will resolve default export export.__esModule=true, I need to do a test)
  • Vue CLI
  • quasar: updated also Vite usage

Linked Issues

closes #452

Additional context

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@userquin
Copy link
Member Author

userquin commented Dec 2, 2023

Updated esbuild entry to use static import, tested on my local with this SB repro (cannot test in SB, wasm error): https://stackblitz.com/edit/node-x4edyc?file=package.json,esbuild.config.js

@userquin
Copy link
Member Author

userquin commented Dec 2, 2023

rspack needs .default, tested with this example in my local: https://github.com/web-infra-dev/rspack/tree/main/examples/vue

@userquin userquin requested a review from antfu December 3, 2023 14:04
@userquin userquin merged commit 04b9e9e into main Dec 3, 2023
@userquin userquin deleted the userquin/docs-update-cjs-usage branch December 3, 2023 14:39
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.

require("unplugin-auto-import/webpack") is not a function

2 participants