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

bug: The plugin does nothing. #29

Closed
Spomni opened this issue Oct 30, 2021 · 0 comments · May be fixed by #30
Closed

bug: The plugin does nothing. #29

Spomni opened this issue Oct 30, 2021 · 0 comments · May be fixed by #30

Comments

@Spomni
Copy link

Spomni commented Oct 30, 2021

Reason: the webpack-sources API is used incorrect.

// it is wrong
let source = assets[asset].source()
source += erudaCode
compilation.assets[asset].source = () => source
compilation.assets[asset].size = () => source.length

An asset is an instance of the Source interface. docs
This interface is not intended to change any of its values.

Should use a ConcatSource instance to add eruda code to the bundle.

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 a pull request may close this issue.

2 participants