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
📝 We can run tests without loader in js mode beause babel only transpile ES2015+ syntax.
However, in ts mode, we need to get loader like babel loader or ts-node/esm
azu
linked a pull request
Mar 25, 2023
that will
close
this issue
Current
textlint-scripts build
output CJS.However, textlint v13.0.0 support native ESM rule.
textlint-scripts
need to support ESM outputs.Proposal A
Add
textlint-scripts-esm
andtextlint-scripts --esm
like ts-node.mjs
becausepackage.json
may not havetype=module
Proposal B
If
package.json
hastype=module
,textlint-scripts
output ESMnpm pkg set "type"="module"
before usingtextlint-scripts
Note 📝
"exports": "./src/index.js"
instead ofmain
ts-node/esm
instead ofts-node
The text was updated successfully, but these errors were encountered: