Skip to content

Commit

Permalink
fix: disabling safeClassNames transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Oct 7, 2022
1 parent 3884725 commit 884ba7c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/transformers/filters/index.js
Expand Up @@ -22,11 +22,16 @@ module.exports = async (html, config = {}, direct = false) => {
filters.postcss = css => PostCSS.process(css, maizzleConfig)
filters.tailwindcss = css => Tailwind.compile(css, html, tailwindConfig, maizzleConfig)

return posthtml([
const posthtmlPlugins = [
styleDataEmbed(),
posthtmlContent(filters),
safeClassNames()
])
posthtmlContent(filters)
]

if (get(config, 'safeClassNames') !== false) {
posthtmlPlugins.push(safeClassNames())
}

return posthtml(posthtmlPlugins)
.process(html, posthtmlOptions)
.then(result => result.html)
}
Expand Down

0 comments on commit 884ba7c

Please sign in to comment.