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

Package.json: add serve and serve-ssl script #29689

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

linbingquan
Copy link
Contributor

Related issue: #XXXX

Description

Background: We can easily and quickly view examples of documents, etc. Do not go far to package and compile logic.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 690.9
171.07
690.9
171.07
+0 B
+0 B
WebGPU 816.55
220.03
816.55
220.03
+0 B
+0 B
WebGPU Nodes 816.06
219.9
816.06
219.9
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 463.45
111.9
463.45
111.9
+0 B
+0 B
WebGPU 538.64
145.42
538.64
145.42
+0 B
+0 B
WebGPU Nodes 494.75
135.28
494.75
135.28
+0 B
+0 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 19, 2024

TBH, the scripts section is already large and I don't see enough arguments for adding the suggested ones.

Why is it an issue to use dev scripts instead? Does the additional logic slow down your system?

@linbingquan
Copy link
Contributor Author

TBH, the scripts section is already large and I don't see enough arguments for adding the suggested ones.

Why is it an issue to use dev scripts instead? Does the additional logic slow down your system?

TBH, I found the CMD npx servez I needed yesterday. Now that this PR is closed, it's OK for me.

Should be my laptop performance is average, feel slow...

> npm run dev

> [email protected] dev
[ROLLUP] created build/three.module.js in 2.1s
[ROLLUP] created build/three.webgpu.js in 2.5s
[ROLLUP] created build/three.webgpu.nodes.js in 2.1s
[ROLLUP] created build/three.module.min.js in 4.9s
[ROLLUP] created build/three.webgpu.min.js in 9s
[ROLLUP] created build/three.webgpu.nodes.min.js in 8s
[ROLLUP] created build/three.cjs in 1.6s

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 19, 2024

AFAICS, the build times should not cause issues if you just want to view examples or the documentation. They do not "block" the local web server process.

@linbingquan
Copy link
Contributor Author

AFAICS, the build times should not cause issues if you just want to view examples or the documentation. They do not "block" the local web server process.

I mostly look at documents and examples. Do not want to run the package build logic during this time. Users can run the corresponding script according to their own needs.

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

Successfully merging this pull request may close these issues.

2 participants