You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a request to allow the use of ES module files as config files for posthtml through the CLI.
I currently have some build tools that use similar configuration files to posthtml. I have an ES module, config.mjs, that is shared among them to provide build-time string replacements (some computed) for different build flavors. It would be desirable to be able to use this config.mjs from within my posthtml config, as well (such as for use with posthtml-expressions).
Unfortunately, I can't dynamically (asynchronously) import config.mjs from my CJS posthtml.config.js. I tried converting posthtml.config.js to an ES module as well, but even explicitly declaring it with the -c option, the CLI gives:
Error: No loader specified for extension ".mjs"
If posthtml-cli could resolve posthtml.config.mjs, then existing ES modules could be leveraged by configurations using posthtml-cli.
The text was updated successfully, but these errors were encountered:
This is a request to allow the use of ES module files as config files for posthtml through the CLI.
I currently have some build tools that use similar configuration files to posthtml. I have an ES module, config.mjs, that is shared among them to provide build-time string replacements (some computed) for different build flavors. It would be desirable to be able to use this config.mjs from within my posthtml config, as well (such as for use with posthtml-expressions).
Unfortunately, I can't dynamically (asynchronously) import config.mjs from my CJS posthtml.config.js. I tried converting posthtml.config.js to an ES module as well, but even explicitly declaring it with the
-c
option, the CLI gives:If posthtml-cli could resolve posthtml.config.mjs, then existing ES modules could be leveraged by configurations using posthtml-cli.
The text was updated successfully, but these errors were encountered: