EmbeddedSourceMapsWarning.js 999 B

12345678910111213141516171819202122232425
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Alexander Akait @alexander-akait
  4. */
  5. "use strict";
  6. const WebpackError = require("./WebpackError");
  7. class EmbeddedSourceMapsWarning extends WebpackError {
  8. /**
  9. * Creates an instance of EmbeddedSourceMapsWarning.
  10. * @param {string} devtool the devtool that embeds them
  11. */
  12. constructor(devtool) {
  13. super(
  14. `embedded source maps: 'devtool: "${devtool}"' writes the source map into the JavaScript itself, and this is a production build.\nThe map is then downloaded by everyone who loads the page, several times the size of the code it describes. A separate '.map' file is fetched only by whoever opens the devtools, and 'hidden-source-map' keeps it off the client entirely while still uploading to an error reporter.\nFor more info visit https://webpack.js.org/configuration/devtool/#production`
  15. );
  16. /** @type {string} */
  17. this.name = "EmbeddedSourceMapsWarning";
  18. }
  19. }
  20. module.exports = EmbeddedSourceMapsWarning;