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

Error: Dynamic require of "stylelint" is not supported #16

Closed
hackyoMa opened this issue Jul 18, 2022 · 7 comments
Closed

Error: Dynamic require of "stylelint" is not supported #16

hackyoMa opened this issue Jul 18, 2022 · 7 comments

Comments

@hackyoMa
Copy link

pnpm create vite my-vue-app --template vue-ts
pnpm install stylelint@^14 -D
pnpm install vite-plugin-stylelint -D
plugins: [vue(), StylelintPlugin()]
pnpm run dev

details:

image

@hackyoMa
Copy link
Author

I'm not sure if it's a problem with upgrading vite to 3.0.0

@ModyQyW
Copy link
Owner

ModyQyW commented Jul 18, 2022

I have updated 5 projects to vite 3 but haven't seen such error. I need some time to research.

@ModyQyW
Copy link
Owner

ModyQyW commented Jul 18, 2022

Removing type: "module" in package.json should be a solution.

@ModyQyW
Copy link
Owner

ModyQyW commented Jul 18, 2022

This package is bundled by tsup (esbuild underhood) and targets at node12. Please track evanw/esbuild#2067, evanw/esbuild#1921 and evanw/esbuild#2111.

Maybe change to unbuild in the future if necessary, since official plugins have changed to unbuild already.

@hackyoMa
Copy link
Author

I understand, thank you for your support

@bleakwind
Copy link

Please change to unbuild!!!

@ModyQyW
Copy link
Owner

ModyQyW commented Jul 20, 2022

type: "module" support should be fixed in v3.0.3. Please have a try.

I don't have much time to change to unbuild recently. PR welcome.

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

3 participants