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

Embroider doesn't disable source map creation for vendor file #2153

Open
Gorzas opened this issue Oct 10, 2024 · 0 comments
Open

Embroider doesn't disable source map creation for vendor file #2153

Gorzas opened this issue Oct 10, 2024 · 0 comments

Comments

@Gorzas
Copy link

Gorzas commented Oct 10, 2024

I'm currently trying to compile the webapp code without creating the source maps files in production. It's currently working for app code but not for vendor.js file (I understand that vendor file has the dependencies from the project). It doesn't matter if I change classic/broccoli configuration or I override Webpack's configuration, it still creates the source map for vendor.js file.

An example of what I have already tried:

module.exports = function (defaults) {
    sourcemaps: {
      enabled: false
    }
  });

  const { Webpack } = require('@embroider/webpack');
  return require('@embroider/compat').compatBuild(app, Webpack, {
    packagerOptions: {
      webpackConfig: {
        devtool: false 
      }
    }
});

This is an example of the dist/assets directory. The webapp files are created without source map as expected but it stills creates it for vendor file:

// ls -la dist/assets
chunk.123.js
chunk.456.js
vendor.css
vendor.js
vendor.css.map
**vendor.map**

I haven't dug deep enough into Embroider's code to know why this happens, so I'm not 100% sure this is an issue with Embroider. Could it be possible that source map configuration isn't passed down to vendor file compilation?

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