In version v0.6.2 default exports stopped working in Webpack. Most likely in other tools too.
This does not work now:
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-vue2-script-setup/webpack')({ /* options */ }),
]
}
You need to write:
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-vue2-script-setup/webpack').default({ /* options */ }),
]
}
It is related to tsup update to version 5.0.0
tsup does not code-split cjs format now. And scripts/postbuild.ts performs an incorrect transformation as output files after build are different.