babelrc-targeted-rollup

阅读时长 3 分钟读完

Builds a babel configuration for rollup with specific targets from babel-preset-env

babelrc-targeted-rollup

Builds a babel configuration for rollup with specific targets from babel-preset-env.

Installation

Usage

Create a .babelrc containing the env preset.

-- -------------------- ---- -------
-
    ---------- -
        ------- -
            ---------- -
                ------     - --
                ---------- - ----- - --------- 
            -
        --
    -
-

Then, in your rollup.config.js:

-- -------------------- ---- -------
------ ------- ---- --------------------------
------ -----   ---- ----------------------

----- ----------- - -
    -----    - --------------------
    -------- - -----------
    -------  - -
        --------- ---
    -
--

----- ------- - -
    -
        ------- -
            ----   - ---------------------
            ------ - ------
            ----   - -----------
        --
        -------- -
            --------------------------
        -
    --
    -
        ------- -
            ----   - ------------------------
            ------ - ----
        --
        ------- - -
            ----------------------
        -
    -
--
------ ------- ------------------------- -- -
    ----------------- ------------ --------------
---

Options

You can pass the same options as for babelrc-rollup plus:

targets (default: [])

The babel-preset-env targets you want to have inside the returned babel configuration.

HomePage

https://github.com/Donov4n/babelrc-targeted-rollup#readme

Repository

git+ssh://git@github.com/Donov4n/babelrc-targeted-rollup.git

来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/6005607881e8991b448dea2b

纠错
反馈