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

Shunter strips out sourceMappingURL from generated JS files #285

Open
zanonnicola opened this issue Oct 22, 2018 · 0 comments
Open

Shunter strips out sourceMappingURL from generated JS files #285

zanonnicola opened this issue Oct 22, 2018 · 0 comments

Comments

@zanonnicola
Copy link
Contributor

Durning Shunter build the JS files go through UglifyJS but it is not instructed to keep the sourceMappingURL comment at the end of the file. Unless you inline the source maps (bad for perf) there's no way at the moment to have those linked in production.

See:

content = uglify.minify(content, {

Maybe is enough to pass the option:

content = uglify.minify(content, {
  fromString: true,
  source_map: {
        filename: config.path.publicResources + '/',
        url: data.assets[name]
    }
}).code;
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