Skip to content

Commit

Permalink
fix(build): add cjs version
Browse files Browse the repository at this point in the history
Fix #145
  • Loading branch information
posva committed Jan 23, 2022
1 parent 381bb51 commit 4ab0b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: ['./src/index'],
// cjsBridge: false,
// emitCJS: false,
declaration: true,
rollup: {
emitCJS: true,
},
externals: ['vue', 'vue-router', '@vue/test-utils'],
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue-router-mock",
"version": "0.1.5",
"description": "Easily test your components by mocking the router",
"main": "dist/index.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"sideEffects": false,
Expand Down

0 comments on commit 4ab0b34

Please sign in to comment.