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

Rollup: Build WebGPURenderer module to single file. #26634

Closed
linbingquan opened this issue Aug 23, 2023 · 2 comments
Closed

Rollup: Build WebGPURenderer module to single file. #26634

linbingquan opened this issue Aug 23, 2023 · 2 comments

Comments

@linbingquan
Copy link
Contributor

linbingquan commented Aug 23, 2023

Description

Build the WebGPURenderer module to a single file to users, it will make the browser network request time shorter.

Single file network info:
image

Current network info:
image

Solution

Add the rollup config.

{
	input: 'examples/jsm/renderers/webgpu/WebGPURenderer.js',
	plugins: [
		addons(),
		glsl(),
		header()
	],
	output: [
		{
			format: 'esm',
			file: 'build/webgpu.module.js' // file name to be announced
		}
	]
}

Alternatives

Users build the 'WebGPURenderer' module themselves.

Additional context

WebGPURenderer single file will make the browser network request time shorter.

@CodyJasonBennett
Copy link
Contributor

Have you seen #16440 or #25947?

@linbingquan
Copy link
Contributor Author

linbingquan commented Aug 23, 2023

Have you seen #16440 or #25947?

Thank you for your reply.

Yes, I was see the #25947 when I opened this issue. Maybe I should closed it...

Sorry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants