0.0.4 • Published 4 years ago

rollup-plugin-componentsjs v0.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

rollup-plugin-componentsjs

Transform wechat mini app components's js

Install

npm install rollup-plugin-componentsjs -D

Useage

// rollup.config.js
import js from 'rollup-plugin-componentsjs';
export default {
  input: 'src/components/custom-component/index.js',
  plugins: [
    js({
      include: 'src/components/custom-component/index.js',
      platform: 'alipay'
    })
  ],
  output: [
		{
			file: 'dist/cjs/compoents/custom-component/index.js',
			format: 'cjs',
		},
		{
			file: 'dist/es/components/custom-components/index.js',
			format: 'es',
		},
	],
}

Options

include type: string or string []

exclude type: string or string []

platform type: string value: alipay

This option is used to determine the platform, default be wechat.