Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether the inclusion size can be optimized #1547

Open
liangshen001 opened this issue Nov 9, 2023 · 0 comments
Open

Whether the inclusion size can be optimized #1547

liangshen001 opened this issue Nov 9, 2023 · 0 comments

Comments

@liangshen001
Copy link

I used rollup for packing and the package was over 50 KB long, There's no other logic in my code

Expected Behavior

The size of the packed inclusion can be reduced to less than 10KB

Current Behavior

The inclusion size is 57KB after packing and compression

Steps to Reproduce (for bugs)

My rollup profile is as follows

/** @type {import('rollup').RollupOptions} */
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import typescript from "@rollup/plugin-typescript";
import terser from "@rollup/plugin-terser";

export default {
	input: 'src/unity/index.ts',
	output: {
		file: 'dist/index.js',
		format: 'esm'
	},
	plugins: [
		resolve(),
		typescript(),
		babel({
			extensions: ['.js', '.ts'],
			presets: ['@babel/preset-env', '@babel/preset-typescript'],
		}),
		terser()
	],
};

Your Environment

"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"rollup": "^4.3.0",
"tslib": "^2.6.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant