diff --git a/src/generators/output/to-string.js b/src/generators/output/to-string.js index dbb6981e..3a90e312 100644 --- a/src/generators/output/to-string.js +++ b/src/generators/output/to-string.js @@ -1,9 +1,8 @@ const fm = require('front-matter') const {get, merge} = require('lodash') const posthtml = require('../posthtml') -const Tailwind = require('../tailwindcss') const Transformers = require('../../transformers') -const posthtmlMSO = require('../../transformers/posthtmlMso') +const Tailwind = require('../tailwindcss') const Config = require('../config') module.exports = async (html, options) => { @@ -60,8 +59,6 @@ module.exports = async (html, options) => { html = await options.afterTransformers(html, config) } - html = await posthtmlMSO(html, config) - return { html, config diff --git a/src/transformers/index.js b/src/transformers/index.js index b7a840d6..5f1be342 100644 --- a/src/transformers/index.js +++ b/src/transformers/index.js @@ -1,10 +1,11 @@ -const inline = require('./inlineCss') const minify = require('./minify') const filters = require('./filters') +const inline = require('./inlineCss') const markdown = require('./markdown') const prettify = require('./prettify') const ensureSixHEX = require('./sixHex') const applyBaseUrl = require('./baseUrl') +const posthtmlMSO = require('./posthtmlMso') const addURLParams = require('./urlParameters') const preventWidows = require('./preventWidows') const replaceStrings = require('./replaceStrings') @@ -35,6 +36,7 @@ exports.process = async (html, config) => { html = await applyBaseUrl(html, config) html = await addURLParams(html, config) html = await ensureSixHEX(html, config) + html = await posthtmlMSO(html, config) html = await prettify(html, config) html = await minify(html, config) html = await replaceStrings(html, config)