sorry, i'm not good at english
i want my lib can import subpath,like:pkg/a
but some js file is not import by entryfile,eg:pkg/c. when rollup build, dist does not have these files.
this is my config file:
build: {
target: 'esnext',
lib: {
entry: './src/index.ts',
formats: ['es'],
},
minify: false,
rollupOptions: {
treeshake: false,
external: ['big.js', 'dayjs', 'web3', 'ohmyfetch'],
output: {
dir: 'dist',
format: 'es',
exports: 'named',
entryFileNames: '[name].mjs',
preserveModules: true, // Keep directory structure and files
sourcemap: true,
},
},
},
i try to disabled treeshake, but not work, a solution is export * with all file,but there may be duplicate names,and i don't want to do that either