Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Webpack 5.96 Breaking Change#647

Unanswered
josheppinette asked this question inQ&A
Dec 10, 2024· 1 comments· 3 replies
Discussion options

Result
The gzip and parsed treemap sizes are missing and the following error is being thrown in the console:

Error parsing bundle asset "/Users/<correct-path>/root.bc550a233bc7d9561c2f.js": 'import' and 'export' may appear only with 'sourceType: module' (1:0)No bundles were parsed. Analyzer will show only original module sizes from stats file.

Cause
Upgrading Webpack 5.95.X to 5.96.X.

Time Since Regression
Webpack v5.96 was released on October 31.

Reproduction

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

Can you create a minimal reproduction case? And maybe look around if you could find another issue for this same topic. I think I've seen this reported somewhere else earlier but can't remember where

You must be logged in to vote
3 replies
@josheppinette
Comment options

Here is thereproduction.

I have seen many issues related to this (i.e. same result), but with a different cause.

@josheppinette
Comment options

@valscion any thoughts? I can dig into this more, but a slight point in the right direction would be helpful.

@valscion
Comment options

Thanks for the reproduction!

Ah so it's most likelyoutput.module = true that creates a bundle which the acorn parser even fails to start parsing.

Here's the function which probably would need attention to figure this out:

https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/f8d4711d7670ffa9fae11cd34787cc45c538f9bb/src/parseUtils.js#L9-L17

My hunch is that thesourceType: 'script' is what causes this breakage.

I don't know if changing the sourceType would break parsing other, more commonly used output formats, though. The tests should fail if so, though.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@josheppinette@valscion

[8]ページ先頭

©2009-2025 Movatter.jp