-
Notifications
You must be signed in to change notification settings - Fork 919
Description
What problem does this feature solve?
ESM is the official standard of JS modules for several years. node.js supports ESM module loading since 8.5.0, although with —-experimental-modules flag. However, the most recent version of vue-loader, 15.0.3, seems to provide no way to be imported using ESM syntax (import { VueLoaderPlugin } from 'vue-loader' or import VueLoaderPlugin from 'vue-loader'). It prevents vue-loader to be used in node.js build scripts that uses Webpack JS API and an ESM syntax. Other Webpack modules seem to support an ESM syntax.
It would be great if a vue-loader would provide an alternative entry point (something like index.esm.js) that could be used to import vue-loader in an ESM syntax described above.
What does the proposed API look like?
An API should provide an importing of vue-loader using a standard ESM syntax as:
import VueLoaderPlugin from 'vue-loader'
or maybe
import VueLoaderPlugin from './node_modules/vue-loader/lib/index.esm.js'