+ ...(isDevelopmentBuild
+ ? {
+ dir: './lib',
+ entryFileNames: '[name].cjs',
+ chunkFileNames: '[name]-[hash].cjs',
+ preserveModules: true,
+ preserveModulesRoot: './src',
+ }
+ : {
+ file: './lib/index.cjs',
+ plugins: [terser({ maxWorkers })],
+ }),
+ ...(sourcemap && {
+ sourcemap,