textlint / editor

textlint editor project.
https://textlint-editor.netlify.app/
MIT License
134 stars 8 forks source link

fix(script-compiler): use static `import` instead of `require` for template #85

Closed azu closed 10 months ago

azu commented 10 months ago

Current script-compiler template use require. webpack allow to compile it and inlining the module. But, If package.json has type=module, webpack does not transpile require. (I dont know the reason). Using static import is a safer way.

Additionaly, this change will help us to support ESM-ed rules/plugins.

fix #84