Skip to content

Commit

Permalink
feat: build esm for playground
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Nov 17, 2022
1 parent 6c3439c commit f31f310
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,21 @@ const prodConfig = defineConfig({
}
})

const esmConfig = defineConfig({
output: {
globals: {
vue: 'Vue'
},
format: 'esm',
file: path.resolve('dist/index.esm.js')
}
})

module.exports = [
// dev umd output
merge(baseConfig, devConfig),
// prod umd output
merge(baseConfig, prodConfig)
merge(baseConfig, prodConfig),
// esm output
merge(baseConfig, esmConfig)
]

0 comments on commit f31f310

Please sign in to comment.