D No entrypoint found for chunks/popup-D05Myka8.js, leaving in chunks directory
Closed this issue · 7 comments
Describe the bug
For some reason, it spits this warning
Reproduction
https://github.com/avi12/youtube-auto-hd/tree/9f9f7d083ec82f90aad4c428ecea73510e94e351
Steps to reproduce
wxt build --debug
System Info
System:
OS: Windows 10 10.0.19045
CPU: (20) x64 Intel(R) Core(TM) i7-6950X CPU @ 3.00GHz
Memory: 35.43 GB / 63.91 GB
Binaries:
Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.14.2 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
Used Package Manager
pnpm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
I believe this results in a massive chunk for the popup.js that weighs over 4 MB, which the Firefox store does not accept
Interesting... I believe that log means there wasn't a file that imports that chunk...
Gets logged when moving the HTML files to their final file location in the output directory.
What does wxt build --analyze
say is the biggest dependency?
What does
wxt build --analyze
say is the biggest dependency?
"C:\Program Files\nodejs\pnpm.cmd" run analyze
> youtube-auto-hd@1.10.0 analyze C:\repositories\extensions\youtube-auto-hd
> wxt build --analyze
WXT 0.19.16 4:19:02 PM
i Building chrome-mv3 for production with Vite 5.4.11 4:19:07 PM
/ [4/5] popup
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
√ Built extension in 5.847 s 4:19:13 PM
├─ build\chrome-mv3-production\manifest.json 1.22 kB
├─ build\chrome-mv3-production\popup.html 524 B
├─ build\chrome-mv3-production\background.js 189.65 kB
├─ build\chrome-mv3-production\chunks\popup-CH08RxKn.js 4.63 MB
├─ build\chrome-mv3-production\content-scripts\desktop.js 217.31 kB
├─ build\chrome-mv3-production\content-scripts\donation.js 491.12 kB
├─ build\chrome-mv3-production\content-scripts\resize.js 194.98 kB
├─ build\chrome-mv3-production\assets\popup-DJqDcVn3.css 11.03 kB
├─ build\chrome-mv3-production\content-scripts\donation.css 909 B
├─ build\chrome-mv3-production\_locales\af\messages.json 920 B
├─ build\chrome-mv3-production\_locales\am\messages.json 102 B
├─ build\chrome-mv3-production\_locales\ar\messages.json 570 B
├─ build\chrome-mv3-production\_locales\be\messages.json 1.5 kB
├─ build\chrome-mv3-production\_locales\bg\messages.json 142 B
├─ build\chrome-mv3-production\_locales\bn\messages.json 102 B
├─ build\chrome-mv3-production\_locales\bs\messages.json 819 B
├─ build\chrome-mv3-production\_locales\ca\messages.json 316 B
├─ build\chrome-mv3-production\_locales\cs\messages.json 188 B
├─ build\chrome-mv3-production\_locales\da\messages.json 718 B
├─ build\chrome-mv3-production\_locales\de\messages.json 782 B
├─ build\chrome-mv3-production\_locales\el\messages.json 160 B
├─ build\chrome-mv3-production\_locales\en_GB\messages.json 102 B
├─ build\chrome-mv3-production\_locales\en_US\messages.json 102 B
├─ build\chrome-mv3-production\_locales\en\messages.json 987 B
├─ build\chrome-mv3-production\_locales\es_419\messages.json 110 B
├─ build\chrome-mv3-production\_locales\es\messages.json 675 B
├─ build\chrome-mv3-production\_locales\et\messages.json 102 B
├─ build\chrome-mv3-production\_locales\fa\messages.json 556 B
├─ build\chrome-mv3-production\_locales\fi\messages.json 258 B
├─ build\chrome-mv3-production\_locales\fil\messages.json 144 B
├─ build\chrome-mv3-production\_locales\fr_CA\messages.json 112 B
├─ build\chrome-mv3-production\_locales\fr\messages.json 1.17 kB
├─ build\chrome-mv3-production\_locales\gl\messages.json 887 B
├─ build\chrome-mv3-production\_locales\gu\messages.json 102 B
├─ build\chrome-mv3-production\_locales\he\messages.json 1.34 kB
├─ build\chrome-mv3-production\_locales\hi\messages.json 102 B
├─ build\chrome-mv3-production\_locales\hr\messages.json 612 B
├─ build\chrome-mv3-production\_locales\hu\messages.json 1.03 kB
├─ build\chrome-mv3-production\_locales\id\messages.json 632 B
├─ build\chrome-mv3-production\_locales\it\messages.json 1.06 kB
├─ build\chrome-mv3-production\_locales\iw\messages.json 1.34 kB
├─ build\chrome-mv3-production\_locales\ja\messages.json 832 B
├─ build\chrome-mv3-production\_locales\ka\messages.json 70 B
├─ build\chrome-mv3-production\_locales\km\messages.json 409 B
├─ build\chrome-mv3-production\_locales\kn\messages.json 102 B
├─ build\chrome-mv3-production\_locales\ko\messages.json 582 B
├─ build\chrome-mv3-production\_locales\lt\messages.json 142 B
├─ build\chrome-mv3-production\_locales\lv\messages.json 102 B
├─ build\chrome-mv3-production\_locales\mk\messages.json 42 B
├─ build\chrome-mv3-production\_locales\ml\messages.json 174 B
├─ build\chrome-mv3-production\_locales\mr\messages.json 102 B
├─ build\chrome-mv3-production\_locales\ms\messages.json 632 B
├─ build\chrome-mv3-production\_locales\my\messages.json 58 B
├─ build\chrome-mv3-production\_locales\nb\messages.json 719 B
├─ build\chrome-mv3-production\_locales\nl\messages.json 920 B
├─ build\chrome-mv3-production\_locales\nn\messages.json 719 B
├─ build\chrome-mv3-production\_locales\no\messages.json 719 B
├─ build\chrome-mv3-production\_locales\pl\messages.json 1.04 kB
├─ build\chrome-mv3-production\_locales\pt_BR\messages.json 907 B
├─ build\chrome-mv3-production\_locales\pt_PT\messages.json 887 B
├─ build\chrome-mv3-production\_locales\pt\messages.json 887 B
├─ build\chrome-mv3-production\_locales\ro\messages.json 144 B
├─ build\chrome-mv3-production\_locales\ru\messages.json 1.48 kB
├─ build\chrome-mv3-production\_locales\sk\messages.json 102 B
├─ build\chrome-mv3-production\_locales\sl\messages.json 141 B
├─ build\chrome-mv3-production\_locales\sr_Latn\messages.json 614 B
├─ build\chrome-mv3-production\_locales\sr\messages.json 878 B
├─ build\chrome-mv3-production\_locales\sv\messages.json 140 B
├─ build\chrome-mv3-production\_locales\sw\messages.json 141 B
├─ build\chrome-mv3-production\_locales\ta\messages.json 155 B
├─ build\chrome-mv3-production\_locales\te\messages.json 165 B
├─ build\chrome-mv3-production\_locales\th\messages.json 152 B
├─ build\chrome-mv3-production\_locales\tl\messages.json 44 B
├─ build\chrome-mv3-production\_locales\tr\messages.json 960 B
├─ build\chrome-mv3-production\_locales\uk\messages.json 854 B
├─ build\chrome-mv3-production\_locales\vi\messages.json 682 B
├─ build\chrome-mv3-production\_locales\zh_CN\messages.json 880 B
├─ build\chrome-mv3-production\_locales\zh_TW\messages.json 879 B
├─ build\chrome-mv3-production\_locales\zh\messages.json 879 B
├─ build\chrome-mv3-production\icon-128.png 5.57 kB
├─ build\chrome-mv3-production\icon-16.png 498 B
├─ build\chrome-mv3-production\icon-32.png 993 B
├─ build\chrome-mv3-production\icon-48.png 1.96 kB
├─ build\chrome-mv3-production\icon-64.png 1.93 kB
└─ build\chrome-mv3-production\icon-off.png 4.13 kB
Σ Total size: 5.79 MB
i Analysis complete: 4:19:13 PM
└─ stats.html
√ Finished in 10.9 s 4:19:13 PM
Process finished with exit code 0
Open the stats.html file in your browser
Interesting, so the bundle analyzer shows 278 KB, not 4.63 MB.
The difference appears to be source maps, very clear if you open up the build/chrome-mv3-production/chunks/popup-CH08RxKn.js
file, 99% of the file is an inline sourcemap. And yeah, you've got them enabled:
Disabling them or setting it to true
fixes the issue. Not familiar with Svelte, but I think that sourcemap is abnormally large. Not related to WXT though, so I'm gonna close this issue.
Edit, I guess I'm wrong about the sourcemap being abnormally large? A sourcemap being 17x the size of the bundled code seems pretty normal, according to claude.ai at least.
I have a JS chunk being built by Vite. it's 278kb large, but if I enable inline source maps, the file is 4.8MB. Is a inline sourcemap usually that large?
That ratio between the minified code and source map size (roughly 17x larger) is actually quite normal for modern JavaScript applications. Source maps contain a lot of information:
The original source code in its unminified form
- Mapping data for every single generated line/character back to its source position
- All original variable names before minification
- Module names and paths
- Additional metadata
The size increase is especially noticeable with:
- Code using modern JS features that get transpiled
- Code using frameworks/libraries with complex build transformations
- Applications with many modules/dependencies
If the source map size is a concern, you have several options:
// vite.config.js export default defineConfig({ build: { // Option 1: Generate external source maps instead of inline sourcemap: true, // instead of 'inline' // Option 2: Generate source maps only for production builds sourcemap: process.env.NODE_ENV === 'production', // Option 3: Disable source maps completely sourcemap: false } })For production, you might want to generate external source maps and upload them to your error tracking service (like Sentry) rather than serving them to users. This gives you debugging capability without increasing the bundle size for end users.