diff --git a/packages/govuk-frontend/babel.config.js b/packages/govuk-frontend/babel.config.js index 8ffc8da586..5cb423a5db 100644 --- a/packages/govuk-frontend/babel.config.js +++ b/packages/govuk-frontend/babel.config.js @@ -11,6 +11,10 @@ module.exports = function (api) { const browserslistEnv = isBrowser ? 'javascripts' : 'node' return { + generatorOpts: { + // Remove all comments without `@preserve` tag + comments: !isBrowser + }, presets: [ ['@babel/preset-env', { browserslistEnv,