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.


A Babel plugin for resolving ESM import and export paths

npm node

dependencies size downloads



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.



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


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


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)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
Dev Dependencies (13)
Dependents (0)

Copyright 2014 - 2016 © |