Skip to content

Add support for importing vue-loader via ESM syntax #1271

@kirlat

Description

@kirlat

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions