diff --git a/packages/govuk-frontend/babel.config.js b/packages/govuk-frontend/babel.config.js index 1a4af435cf..e7896b0641 100644 --- a/packages/govuk-frontend/babel.config.js +++ b/packages/govuk-frontend/babel.config.js @@ -27,9 +27,12 @@ module.exports = function (api) { ) // Flag any JSDoc comments worth keeping - const isDocumentation = ['* @param', '* @returns', '* @typedef'].some( - (tag) => comment.includes(tag) - ) + const isDocumentation = [ + '* @param', + '* @returns', + '* @typedef', + '* @import' + ].some((tag) => comment.includes(tag)) // Print only public JSDoc comments return !isPrivate && isDocumentation