0.1.1 • Published 6 years ago

babel-plugin-atom-demand v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

babel-plugin-atom-demand

NPM version NPM downloads

babel plugin for import vue-atom-ui on demand

Install

babel-plugin-atom-demand

Example

Converts

import Atom from 'vue-atom-ui';
import { Button } from 'vue-atom-ui';

(roughly) to

var _atom = require('vue-atom-ui/lib/Atom');

var _atom2 = _interopRequireDefault(_atom);

var _button = require('vue-atom-ui/lib/Button');

var _button2 = _interopRequireDefault(_button);

require('vue-atom-ui/lib/css/button.css');

Usage

npm install babel-plugin-atom-demand --save-dev

Via .babelrc or babel-loader.

{
  "plugins": ["atom-demand"]
}

Note

babel-plugin-atom-demand will be not working if you add the vue-atom-ui in webpack config vender