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.
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 transpilerequire
. (I dont know the reason). Using staticimport
is a safer way.Additionaly, this change will help us to support ESM-ed rules/plugins.
fix #84