-
Notifications
You must be signed in to change notification settings - Fork 4.8k
chore: add tsdown #17746
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
base: main
Are you sure you want to change the base?
chore: add tsdown #17746
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
const path = require('path') | ||
import path from 'node:path' | ||
import { fileURLToPath } from 'node:url' | ||
|
||
module.exports = { | ||
const __dirname = path.dirname(fileURLToPath(import.meta.url)) | ||
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.
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. 在 package.json 里加了 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. 我个人倾向于先保持 commonjs 的效果,避免一些意外。 |
||
|
||
export default { | ||
globals: { | ||
ENABLE_INNER_HTML: true, | ||
ENABLE_ADJACENT_HTML: true, | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineConfig } from 'tsdown' | ||
|
||
export default [ | ||
defineConfig({ | ||
entry: 'src/index.ts', | ||
noExternal: ['@tarojs/shared'], | ||
treeshake: false, | ||
sourcemap: true, | ||
unbundle: true, | ||
}), | ||
defineConfig({ | ||
entry: { | ||
'runtime.esm': 'src/index.ts', | ||
}, | ||
noExternal: ['@tarojs/shared'], | ||
treeshake: false, | ||
sourcemap: true, | ||
}) | ||
] |
Uh oh!
There was an error while loading. Please reload this page.