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

Type '{ strictRequires: string[]; }' is not assignable to type 'RollupCommonJSOptions'. Object literal may only specify known properties, and 'strictRequires' does not exist in type 'RollupCommonJSOptions'. #9475

Closed
4 tasks done
brendon opened this issue Jul 31, 2022 · 2 comments · Fixed by #9489
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@brendon
Copy link

brendon commented Jul 31, 2022

Description

I'd like to use the new stringRequires feature outlined here: https://github.com/rollup/plugins/tree/master/packages/commonjs#strictrequires

I get a TypeScript warning (per the subject line). I assume that the compiled version of @rollup/plugin-commonjs isn't 22.x that is when stringRequires was added.

The dev dependency is specified as "@rollup/plugin-commonjs": "^22.0.1",. But perhaps the build is happening on an older version?

Suggested solution

I assume vite would just need to be built against this newer version of @rollup/plugin-commonjs?

Alternative

No response

Additional context

No response

Validations

@brendon
Copy link
Author

brendon commented Jul 31, 2022

@brendon
Copy link
Author

brendon commented Aug 1, 2022

I'll leave this open in case someone thinks it's a good idea, but I did end up finding more documentation in the Vite 3 release notes about how to just use esbuild in production (before Vite 4). Since I did all the work to get my javascript working with esbuild in development, it made sense to just use this build tool in production too. I'm glad that's becoming the default in the future as to be honest, it caused me so much confusion when trying to convert from webpack.

@sapphi-red sapphi-red added p2-edge-case Bug, but has workaround or limited in scope (priority) and removed enhancement: pending triage labels Aug 1, 2022
bluwy pushed a commit that referenced this issue Aug 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants