We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
API Extractor
Swatinem/rollup-plugin-dts: A rollup plugin to generate .d.ts rollup files for your typescript project 이것도 같은 역할을 함
import { existsSync } from 'fs' import fs from 'fs/promises' import path from 'path' import { legacy, resolve } from 'resolve.exports' import { rollup } from 'rollup' import dts from 'rollup-plugin-dts' import { externals } from 'rollup-plugin-node-externals' import packageInfo from './package.json' const externalDependenciesRegExrs = [ ...Object.keys(packageInfo.dependencies), ...Object.keys(packageInfo.peerDependencies), // Next.js library css import 제약 https://nextjs.org/docs/messages/css-npm // @atelier/core의 style.css 등 CSS 디펜던시는 최종 번들에 포함 // 나머지는 제외 // https://jira.woowa.in/browse/WOOTELIER-469 ].map((name) => new RegExp(`^${name}(/.*)?(?<!\\.css)$`)) console.log('시작') async function build() { console.log('시작') const dtsEntryPath = path.join(process.cwd(), './dist/index.d.ts') console.log(dtsEntryPath) const outDir = path.dirname(dtsEntryPath) console.log('Bundling', dtsEntryPath) try { const bundle = await rollup({ input: dtsEntryPath, external: (id) => { // jsx-runtime react 17 & 18 동시 지원 이슈 // https://jira.woowa.in/browse/WOOTELIER-469 if (id === 'react/jsx-runtime') return false return externalDependenciesRegExrs.some((regex) => regex.test(id)) }, plugins: [ externals({ packagePath: path.resolve('./package.json'), deps: true, devDeps: false, exclude: externalDependenciesRegExrs, // always bundle include: ['@jest/transform'], // don't bundle }), dts({ compilerOptions: { incremental: false, noEmitOnError: false, }, respectExternal: true, }), ], }) console.log('번들 끝 ', bundle) // There is a chance that two `buildEntry`s will run at the same time // and one will attempt to read while the other is writing. To fix that, // we'll defer the overwrite until all the bundles are ready return async () => { await bundle.write({ dir: outDir, entryFileNames: '[name].ts', minifyInternalExports: false, }) } } catch (e: any) { console.error('Error bundling', dtsEntryPath) console.error(e) throw e } } build().then((write) => write())
The text was updated successfully, but these errors were encountered:
No branches or pull requests
title:
full_path: src/pages/.md
API Extractor
Swatinem/rollup-plugin-dts: A rollup plugin to generate .d.ts rollup files for your typescript project 이것도 같은 역할을 함
The text was updated successfully, but these errors were encountered: