@talend/babel-plugin-assets-api

1.3.1 • Public • Published

@talend/babel-plugin-assets-api

This plugin is underground friends of @talend/assets-api package.

Because we care about developer experience and because no one want to maintain in the code base versions of packages we have decided to propose this babel plugin.

It transform the following code:

import assetsAPI from '@talend/assets-api';

assetsAPI.getURL('/', 'react');
assetsAPI.getJSON('/foo.json', 'react');
assetsAPI.getUMD('react');

into this code needed for runtime:

import assetsAPI from '@talend/assets-api';

assetsAPI.getURL('/', 'react', '16.14.0');
assetsAPI.getJSON('/foo.json', 'react', '16.14.0');
assetsAPI.getUMD('react', '16.14.0', 'React', '/umd/react.production.min.js');

As you can see it uses production path in the getUMD.

Readme

Keywords

none

Package Sidebar

Install

npm i @talend/babel-plugin-assets-api

Weekly Downloads

421

Version

1.3.1

License

Apache-2.0

Unpacked Size

7.97 kB

Total Files

8

Last publish

Collaborators

  • talend-frontend