Skip to content

Commit

Permalink
Configure Babel to remove all comments without @preserve tag
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jul 17, 2023
1 parent 2572bbd commit 2bece48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/govuk-frontend/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2bece48

Please sign in to comment.