Skip to content

Commit

Permalink
chore: 更新了构建文件,支持module
Browse files Browse the repository at this point in the history
  • Loading branch information
xpyjs committed Jun 17, 2024
1 parent bb089f2 commit 173c455
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ yarn add @xpyjs/gantt

```js
import XGantt from "@xpyjs/gantt";
import "@xpyjs/gantt/dist/index.css";
import "@xpyjs/gantt/index.css";

createApp(App).use(XGantt).mount('#app')
```
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ yarn add @xpyjs/gantt // 推荐

```js
import Gantt from "@xpyjs/gantt";
import "@xpyjs/gantt/dist/index.css";
import "@xpyjs/gantt/index.css";

createApp(App).use(Gantt).mount("#app");
```
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"README.md"
],
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"module": "./dist/index.mjs",
"types": "./types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./dist/index.es.js",
"import": "./dist/index.mjs",
"require": "./dist/index.umd.js"
},
"./dist/index.css": {
Expand Down Expand Up @@ -119,4 +119,4 @@
"path": "node_modules/cz-git"
}
}
}
}
5 changes: 3 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export default defineConfig(async () => ({
minify: true,
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'index',
fileName: format => `index.${format}.js`
name: 'XGantt',
fileName: 'index'
// fileName: format => `index.${format}.js`
},
rollupOptions: {
external: ['vue'],
Expand Down

0 comments on commit 173c455

Please sign in to comment.