Skip to content
New issue

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

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

Already on GitHub? Sign in 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

  • Rollup Plugin Name: @rollup/plugin-typescript
  • Rollup Plugin Version: 11.1.6
  • Rollup Version: 4.20.0
  • Operating System (or Browser): none
  • Node Version: 18
  • Link to reproduction (⚠️ read below): https://github.com/JusticHentai/utils-template

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()],
  },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant