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

Fix quotation chars when eval-cheap-source-map is used #2847

Merged
merged 3 commits into from
Jun 2, 2021

Conversation

jeffposnick
Copy link
Contributor

R: @tropicadri

Fixes #2729

Because InjectManifest adds JSON serialized data to compiled JavaScript files, it can sometimes lead to invalid JavaScript if the compiled JS is itself wrapped in a string—that's what can happen in various webpack sourcemap modes.

In some modes, the string that it's wrapped in is terminated with " characters, so the serialized JSON needs to use '. In other modes, apparently, the string it's wrapped in is terminated with ' characters, so the serialized JSON needs to use ". This PR accounts for one of those modes, which only happens when eval-cheap-source-map and minimization are used.

(This PR also picked up a few changes to package.json and package-lock.json files that appear not to have been committed following the previous PR.)

@tropicadri tropicadri merged commit f6fb94a into v6 Jun 2, 2021
@jeffposnick jeffposnick deleted the eval-cheap-sourcemap-fix branch July 14, 2021 20:47
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.

workbox-webpack-plugin build error with TypeScript and eval-cheap-source-map
2 participants