-
-
Notifications
You must be signed in to change notification settings - Fork 200
build: use tsdown for plugin-react / plugin-react-oxc #554
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "include": ["src", "scripts"], | ||
| "include": ["src"], | ||
| "compilerOptions": { | ||
| "outDir": "dist", | ||
| "target": "ES2020", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { defineConfig } from 'tsdown' | ||
|
|
||
| export default defineConfig({ | ||
| entry: 'src/index.ts', | ||
| define: { | ||
| 'globalThis.__IS_BUILD__': 'true', | ||
| }, | ||
| copy: [ | ||
| { | ||
| from: 'node_modules/@vitejs/react-common/refresh-runtime.js', | ||
| to: 'dist/refresh-runtime.js', | ||
| }, | ||
| ], | ||
| }) | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "include": ["src", "scripts"], | ||
| "include": ["src"], | ||
| "compilerOptions": { | ||
| "outDir": "dist", | ||
| "target": "ES2020", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { defineConfig } from 'tsdown' | ||
|
|
||
| export default defineConfig({ | ||
| entry: 'src/index.ts', | ||
| format: ['esm', 'cjs'], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we go to esm only at the same time?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can do it in a separate PR. |
||
| define: { | ||
| 'globalThis.__IS_BUILD__': 'true', | ||
| }, | ||
| copy: [ | ||
| { | ||
| from: 'node_modules/@vitejs/react-common/refresh-runtime.js', | ||
| to: 'dist/refresh-runtime.js', | ||
| }, | ||
| ], | ||
| outputOptions(outputOpts, format) { | ||
| if (format === 'cjs') { | ||
| outputOpts.footer = 'module.exports.default = module.exports' | ||
| } | ||
| return outputOpts | ||
| }, | ||
| }) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.