Commit d732979b by xuzhenzhao

chore(custom): vite.config.ts

parent a722b7bf
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
"files": [ "files": [
"dist" "dist"
], ],
"module": "./dist/index.mjs", "module": "./dist/index.js",
"exports": { "exports": {
".": { ".": {
"import": "./dist/index.mjs", "import": "./dist/index.js",
"require": "./dist/index.umd.js" "require": "./dist/index.umd.js"
} }
}, },
......
...@@ -4,6 +4,7 @@ import { defineConfig } from 'vite' ...@@ -4,6 +4,7 @@ import { defineConfig } from 'vite'
export default defineConfig(() => { export default defineConfig(() => {
return { return {
build: { build: {
target: "es2015",
lib: { lib: {
entry: path.resolve(__dirname, 'src/index'), entry: path.resolve(__dirname, 'src/index'),
name: 'toolkit', name: 'toolkit',
......
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