Skip to content

Commit

Permalink
fix(build): add mjs build
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 23, 2022
1 parent 1826ab4 commit b4c3940
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ module.exports = [
format: 'cjs'
},
{
input: resolve('src/entries/esm.js'),
input: resolve('src/index.js'),

This comment has been minimized.

Copy link
@xiaoxiangmoe

xiaoxiangmoe Aug 23, 2022

Contributor

Why change src/entries/esm.js to src/index.js?
This may causing vite can't import START_LOCATION, NavigationFailureType and isNavigationFailure from it.

file: resolve('dist/vue-router.esm.js'),
format: 'es'
},
{
input: resolve('src/entries/esm.js'),
file: resolve('dist/vue-router.mjs'),
format: 'es'
},
{
input: resolve('src/entries/esm.js'),
file: resolve('dist/vue-router.esm.browser.js'),
Expand Down

0 comments on commit b4c3940

Please sign in to comment.