-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
Version
3.0.0-beta.15
Reproduction link
https://github.com/lossendae/vue-table
Steps to reproduce
I want to expose 2 components and 2 mixins from my library (and eventually later, when its working, move the install function as well, in order to set the default import to VueTable)
When i build the library with vue-cli-service build --target lib --name VueTable src/main.js
the install function is available but none of the 4th exports
What is expected?
I would like to be able to import the modules with import { VueTable, vueTableMixin, VueTablePagination, vueTablePaginationMixin } from '@lossendae/vue-table'
What is actually happening?
Any of those imports return undefined
This look like an issue with tree shaking. I tested a bunch of config options locally via the vue.config.js
file but to no avail :
module.exports = {
chainWebpack: config => {
config.optimization.removeAvailableModules(false)
config.optimization.concatenateModules(false)
config.optimization.providedExports(false)
config.optimization.providedExports(false)
config.optimization.usedExports(false)
config.optimization.sideEffects(false)
config.optimization.minimize(false)
config.optimization.flagIncludedChunks(false)
},
}
p-kuen, PengXiaoFabric and natuan62