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
{{ message }}
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.
Recently, i made a PR for including support for .mjs files, but after some tests and bug tracking, i've noticed a unexpected behavior coming from joycon
According to the docs:
By default only .js and .json file are parsed, otherwise raw data will be returned, so you can add custom loader to parse them
So, that means .mjs files are excluded as valid configuration files, expect, if they are properly parsed and interpreted, and this can be done with the .addLoader() method, right after the warning above
But this solution reaches to a dead end road, as the project is written with commonjs module system, consequently, being unable to import anything esm-ishy, simply migrating everything to esm seems cumbersome (i've tried, with no success), also, i thought on some other possible solutions like:
Relying on fs.readFileSync() to accomplish this task
But both methods above seems really hacky and overcomplicated, do you have any insight on how to include .mjs files into the parsing process? (the same way that happens with .js files)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey there, @egoist!
Recently, i made a PR for including support for .mjs files, but after some tests and bug tracking, i've noticed a unexpected behavior coming from
joycon
According to the docs:
So, that means
.mjs
files are excluded as valid configuration files, expect, if they are properly parsed and interpreted, and this can be done with the.addLoader()
method, right after the warning aboveBut this solution reaches to a dead end road, as the project is written with commonjs module system, consequently, being unable to import anything esm-ishy, simply migrating everything to esm seems cumbersome (i've tried, with no success), also, i thought on some other possible solutions like:
acorn
to parse the.mjs
saofilefs.readFileSync()
to accomplish this taskBut both methods above seems really hacky and overcomplicated, do you have any insight on how to include
.mjs
files into the parsing process? (the same way that happens with.js
files)The text was updated successfully, but these errors were encountered: