@choseohwan/rollup-plugin-builder-base
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

@choseohwan/rollup-plugin-builder-base

Base plugins builder about @choseohwan/rollup-builder

Install

npm

npm install @choseohwan/rollup-plugin-builder-base @choseohwan/rollup-builder --save-dev

yarn

yarn add @choseohwan/rollup-plugin-builder-base @choseohwan/rollup-builder -D

Description

List of applied plugins

Usage

Create rollup.config.js and babel.config.js in project root.

rollup.config.js

import buildRollupOptions, { Input, OutputBuilder } from '@choseohwan/rollup-builder';
import buildBasePlugins from "@choseohwan/rollup-plugin-builder-base";
// another imports...

// makes input object (rollup config's input option)
const input = new Input(
    {
        index: 'src/index.ts',
        option: 'src/option/index.ts',
        builder: 'src/builder/index.ts'
    },
    {
        umd: 'src/index.ts'
    }
);

// makes output builder
const outputBuilder = new OutputBuilder({
    sourcemap: true
});

// create plugins object using @choseohwan/rollup-plugin-builder-base
const plugins = buildBasePlugins();

// make rollup options with options
export default buildRollupOptions(
    input,
    [
        outputBuilder.buildES({
            dir: 'dist/esm'
        }),
        outputBuilder.buildCJS({
            dir: 'dist/cjs'
        }),
        outputBuilder.buildUMD('common', {
            dir: 'dist/umd'
        })
    ],
    plugins
);

babel.config.js

module.exports = {
    // babel setup config here...
}

Readme

Keywords

Package Sidebar

Install

npm i @choseohwan/rollup-plugin-builder-base

Weekly Downloads

9

Version

2.0.4

License

ISC

Unpacked Size

19.8 kB

Total Files

7

Last publish

Collaborators

  • wtae1216