Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[BUG] Bloated bundle size #574

Closed
2 tasks done
HugeLetters opened this issue May 8, 2023 · 1 comment
Closed
2 tasks done

[BUG] Bloated bundle size #574

HugeLetters opened this issue May 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@HugeLetters
Copy link
Contributor

HugeLetters commented May 8, 2023

What happened?

Running plasmo build --minify produces
image

Running plasmo build --minify --source-maps produces
image
Also this command runs extremely slow compared to the first one - 10s vs 200s (logs below). The step which takes up all the time is 🟡 0 | @plasmohq/parcel-packager, the last one.

Docs state that building for prod doesn't produce source maps by default but apparently it does - however I don't see any sourcemaps in the first produced bundle. But I will be honest I'm not nearly skilled enough to dig through both minified files to determine where does the bloat come from. I think I've tried rebuilding with vanilla tsconfig & package.json from create plasmo and results were the same but perhaps I've missed something.

The repo is here

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

No response

Relevant log output

> guessthegame-extended@0.0.2 build C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame
> plasmo build --minify "--verbose"

🟡 0      | Running command: build
🟣 Plasmo v0.69.3
🔴 The Browser Extension Framework
🔵 INFO   | Prepare to bundle the extension...
🟡 1      | Creating Manifest Factory...
🟡 2      | Ensure exists: C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\.plasmo
🟡 3      | C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\assets\icon.png found, creating resized icons
🟡 4      | Creating static templates for popup
🟡 5      | Creating static templates for options
🟡 6      | Creating static templates for newtab
🟡 7      | Creating static templates for devtools
🟡 8      | Parsed config: {
  matches: [ 'https://guessthe.game/', 'https://guessthe.game/?fpg=*' ],
  run_at: 'document_end',
  all_frames: true
}
🟡 9      | Adding content script:  C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\contents\mainPage.ts
🟡 10     | { messageHandlerList: [], portHandlerList: [] }
🟡 11     | Hash changed, updating manifest
🔵 INFO   | Loaded environment variables from: []
🟡 0      | @plasmohq/parcel-transformer-manifest
🟡 1      | Adding icons
🟡 2      | Adding default_icon
🟡 3      | Adding default_popup
🟡 4      | Handling background service worker
🟡 0      | @plasmohq/parcel-bundler
🟡 0      | @plasmohq/parcel-packager
🟢 DONE   | Finished in 10636ms!

------------------------------------------------------------------
> guessthegame-extended@0.0.2 build C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame
> plasmo build --minify --source-maps "--verbose"

🟡 0      | Running command: build
🟣 Plasmo v0.69.3
🔴 The Browser Extension Framework
🔵 INFO   | Prepare to bundle the extension...
🟡 1      | Creating Manifest Factory...
🟡 2      | Ensure exists: C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\.plasmo
🟡 3      | C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\assets\icon.png found, creating resized icons
🟡 4      | Creating static templates for popup
🟡 5      | Creating static templates for options
🟡 6      | Creating static templates for newtab
🟡 7      | Creating static templates for devtools
🟡 8      | Parsed config: {
  matches: [ 'https://guessthe.game/', 'https://guessthe.game/?fpg=*' ],
  run_at: 'document_end',
  all_frames: true
}
🟡 9      | Adding content script:  C:\Users\ckuka\VS Code Projects\Chrome Extensions\guessthegame\contents\mainPage.ts
🟡 10     | { messageHandlerList: [], portHandlerList: [] }
🟡 11     | Hash changed, updating manifest
🔵 INFO   | Loaded environment variables from: []
🟡 0      | @plasmohq/parcel-transformer-manifest
🟡 1      | Adding icons
🟡 2      | Adding default_icon
🟡 3      | Adding default_popup
🟡 4      | Handling background service worker
🟡 0      | @plasmohq/parcel-bundler
🟡 0      | @plasmohq/parcel-packager
🟢 DONE   | Finished in 211037ms!

(OPTIONAL) Contact Details

ckuka71@gmail.com

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@HugeLetters HugeLetters added the bug Something isn't working label May 8, 2023
@louisgv
Copy link
Contributor

louisgv commented May 10, 2023

So 2 issues:

@louisgv louisgv closed this as completed May 10, 2023
@louisgv louisgv reopened this May 10, 2023
@PlasmoHQ PlasmoHQ locked and limited conversation to collaborators May 10, 2023
@louisgv louisgv converted this issue into discussion #579 May 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants