Commit 12a39ce0 by xuzhenzhao

chore(custom): ts target set 'es5'

.gitignore add macos temp
package.json add typedoc script
parent ca609c57
......@@ -9,8 +9,7 @@
"next": "bash scripts/publish-next.sh",
"commit": "git add . && npx cz-customizable",
"preinstall": "npx only-allow pnpm",
"lib": "pnpm --filter=@ydl-packages/* run lib",
"prepublishOnly": "npm run lib"
"lib": "pnpm --filter=@ydl-packages/* run lib"
},
"keywords": [],
"author": "xuzhenzhao",
......
......@@ -6,7 +6,8 @@
"scripts": {
"lib": "npx vite build",
"test": "npx jest __tests__",
"doc": "npx typedoc"
"doc": "npx typedoc",
"prepublishOnly": "npm run lib"
},
"keywords": [
"pay",
......
......@@ -11,7 +11,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "es2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
......
import path from 'path'
import {defineConfig} from 'vite'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
export default defineConfig(() => {
return {
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
build: {
target: "es2015",
return {
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
build: {
target: 'es2015',
lib: {
entry: path.resolve(__dirname, 'src/index'),
name: 'toolkit',
fileName: 'index',
formats: ['es', 'umd'],
sourcemap: 'inline'
},
outDir: path.resolve(__dirname, 'dist')
},
plugins: [dts()]
}
})
\ No newline at end of file
lib: {
entry: path.resolve(__dirname, 'src/index'),
name: 'toolkit',
fileName: 'index',
formats: ['es', 'umd'],
sourcemap: 'inline'
},
outDir: path.resolve(__dirname, 'dist')
},
plugins: [dts()]
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment