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

Allow the use of @vitejs/plugin-react-swc #552

Merged
merged 5 commits into from
Feb 7, 2023
Merged

Allow the use of @vitejs/plugin-react-swc #552

merged 5 commits into from
Feb 7, 2023

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Feb 3, 2023

Fixes #551

This will first look for @vitejs/plugin-react, then @vitejs/plugin-react-swc. It seems like the SWC version might not work with MDX stories, though. I updated the react-18 example to use it, and the intro story doesn't load. I don't think that should necessarily block this PR though.

@socket-security
Copy link

socket-security bot commented Feb 3, 2023

Socket Security Pull Request Report

Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.

📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
@swc/[email protected] (added) postinstall examples/react-18/package.json via @vitejs/[email protected], packages/builder-vite/package.json via @vitejs/[email protected]
⚠️ Uses eval

Package uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.

Avoid packages that use eval, since this could potentially execute any code.

Package Eval Type Location Source
[email protected] (upgraded) Function dist/shared/loadConfigFile.js examples/lit-ts/package.json via @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], examples/vue2.7/package.json via @storybook/[email protected], examples/vue3/package.json via @storybook/[email protected], [email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @sveltejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], [email protected]
[email protected] (upgraded) Function dist/shared/loadConfigFile.js examples/lit-ts/package.json via @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], examples/vue2.7/package.json via @storybook/[email protected], examples/vue3/package.json via @storybook/[email protected], [email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @sveltejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], [email protected]
[email protected] (added) Function dist/cjs/index.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/preact/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], packages/builder-vite/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected]
[email protected] (added) Function dist/esm/index.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/preact/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], packages/builder-vite/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected]
[email protected] (upgraded) Function dist/bundle.min.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], [email protected]
[email protected] (upgraded) Function dist/bundle.min.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], [email protected]
[email protected] (upgraded) Function dist/bundle.min.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], @vitejs/[email protected], [email protected]
[email protected] (upgraded) Function dist/bundle.min.js examples/lit-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/preact/package.json via @preact/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/react/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-18/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/react-ts/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/svelte/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], [email protected], examples/vue2.6/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue2.7/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], [email protected], examples/vue3/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], examples/workspaces/package.json via @storybook/[email protected], examples/workspaces/packages/catalog/package.json via @storybook/[email protected], @storybook/[email protected], @storybook/[email protected], @vitejs/[email protected], [email protected], packages/builder-vite/package.json via @joshwooding/[email protected], @storybook/[email protected], @storybook/[email protected], @sveltejs/[email protected], @vitejs/[email protected], [@vit

@IanVS IanVS merged commit 4d49af6 into main Feb 7, 2023
@IanVS IanVS deleted the support-react-swc branch February 7, 2023 00:03
@tastafur
Copy link

tastafur commented Feb 7, 2023

Thank you very much for your work @IanVS : D

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.

[Bug] Does not work with @vitejs/plugin-react-swc
3 participants