@kano/es6-resolution
TypeScript icon, indicating that this package has built-in type declarations

1.0.20 • Public • Published

ES6 names resolution for servers

Transforms your named ES6 Imports into resolved paths, allowing a browser to fetch the dependencies.

Usage

const resolve = require('@kano/es6-resolution');

const body = `
import { Utils } from '@acme/my-lib/lib/utils.js';

`;

const upgradedBody = resolve(body, 'application/javascript', __dirname + '/index.js');

Will be translated to

import { Utils } from '../../node_modules/@acme/my-lib/lib/utils.js';

Browsers will be happy and no code compilation is needed

Readme

Keywords

none

Package Sidebar

Install

npm i @kano/es6-resolution

Weekly Downloads

2

Version

1.0.20

License

MIT

Unpacked Size

11 kB

Total Files

10

Last publish

Collaborators

  • jielijieli
  • ellenw3lsh
  • camuskano
  • alexfiennes
  • kanocomputing
  • rpazdera
  • jamie_old_plantain