Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

@rollup/plugin-typescript The packaging product does not use the helper functions in tslib #1756

Open
JusticHentai opened this issue Aug 12, 2024 · 0 comments

Comments

@JusticHentai
Copy link

Expected Behavior

some hepler function import from tslib

Actual Behavior

the hepler function declaration in packaging product

Additional Information

import { getBabelOutputPlugin } from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import dts from 'rollup-plugin-dts'

export default [
  {
    input: './index.ts',
    output: [
      {
        file: './dist/utils.js',
        format: 'es',
      },
    ],
    plugins: [
      resolve(),
      commonjs(),
      typescript(),
      getBabelOutputPlugin({
        presets: [
          [
            '@babel/preset-env',
            {
              modules: false,
              useBuiltIns: 'usage',
              corejs: '3.34.0',
            },
          ],
        ],
        plugins: ['@babel/plugin-transform-runtime'],
      }),
    ],
  },
  {
    input: './index.ts',
    output: [
      {
        file: './dist/utils.d.ts',
        format: 'es',
      },
    ],
    plugins: [dts()],
  },
]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant