babel-plugin-esm-resolver
A Babel plugin for resolving ESM import and export paths
Last updated a year ago by alexanderomara .
MPL-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-plugin-esm-resolver 
SYNC missed versions from official npm registry.

babel-plugin-esm-resolver

A Babel plugin for resolving ESM import and export paths

npm node

dependencies size downloads

travis-ci

Overview

Resolves ESM import and export paths to other source modules with extensions, optionally replacing the extension with a different one. This is useful because browsers cannot perform automatic file extension resolution, and other environments like Node may not have this enabled by default either.

Since it resolves the statements before the modules are transpiled, it can also be used to resolve the paths for other transpiled module loaders.

Must be configured to work properly, it will not do anything by default.

There are three classes of resolver that can be enabled (source, module, submodule) depending on the modules that need to be resloved.

Usage

Options

  • source Source modules (import foo from './bar').
  • module Module main entry points (import foo from 'bar').
  • submodule Module submodules (import foo from 'bar/foo').

Bugs

If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.

License

Copyright (c) 2019 Alexander O'Mara

Licensed under the Mozilla Public License, v. 2.0.

If this license does not work for you, feel free to contact me.

Current Tags

  • 2.1.0                                ...           latest (a year ago)

6 Versions

  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |