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

SourceMaps referenced but not written or referenced instead of inlined #22

Open
tholewebgods opened this issue Jun 27, 2023 · 1 comment

Comments

@tholewebgods
Copy link

tholewebgods commented Jun 27, 2023

Problem description

When inlining a script using

new InlineSourceWebpackPlugin({
	compress: true,
	noAssetMatch: "error",
}),

and

<script inline inline-asset="foo-main.+\.js$" inline-asset-delete></script>

The asset to be inlined is not located in the physical filesystem, but emitted by Webpack.

The resulting file references a SourceMap like so:

//# sourceMappingURL=foo.0d0fb7084e53fd4fd4b3.js.map

but the file is not present in the Filesystem.

Expected behavior

The SourceMap

  • is inlined or
  • .map file is written to the proper location
@tholewebgods
Copy link
Author

I see. By using inline-asset-delete the .js and .map file have been deleted.

Let's modify the expected behavior:

  • The SourceMap is inlined when the asset file is deleted
  • The .map file is not deleted, when asset deletion was requested (delete only .js) and the proper relative path to the .map is written

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

No branches or pull requests

1 participant