diff --git a/.changeset/strange-vans-double.md b/.changeset/strange-vans-double.md new file mode 100644 index 000000000..42b5570dc --- /dev/null +++ b/.changeset/strange-vans-double.md @@ -0,0 +1,5 @@ +--- +'@modern-kit/react': patch +--- + +fix(react): rollup setting 수정 - @ssi02014 diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs index c326ef08e..d60527b5e 100644 --- a/packages/react/rollup.config.mjs +++ b/packages/react/rollup.config.mjs @@ -18,7 +18,7 @@ import { getSubEntryMap, getFormatEntryFileNames } from './build.utils.mjs'; const extensions = ['.js', '.jsx', '.ts', '.tsx']; export default { - preserveModules: false, + preserveModules: true, input: { components: './src/components/index.ts', hooks: './src/hooks/index.ts', @@ -33,14 +33,12 @@ export default { dir: './dist', sourcemap: true, format: 'cjs', - preserveModules: false, entryFileNames: (chunkInfo) => getFormatEntryFileNames(chunkInfo, 'js'), }, { dir: './dist', sourcemap: true, format: 'esm', - preserveModules: false, entryFileNames: (chunkInfo) => getFormatEntryFileNames(chunkInfo, 'mjs'), }, ], @@ -57,7 +55,7 @@ export default { exclude: ['**/*.spec.tsx', '**/*.spec.ts', './src/_internal/test/*'], }), commonjs(), - esbuild(), + esbuild({ minify: true }), postcss({ modules: true, minimize: true, diff --git a/packages/react/src/components/LazyImage/index.tsx b/packages/react/src/components/LazyImage/index.tsx index 807fbfb31..506886606 100644 --- a/packages/react/src/components/LazyImage/index.tsx +++ b/packages/react/src/components/LazyImage/index.tsx @@ -1,6 +1,6 @@ import React, { forwardRef } from 'react'; import { useIntersectionObserver } from '../../hooks/useIntersectionObserver'; -import { useMergeRefs } from '../../hooks/useMergeRefs'; +import { mergeRefs } from '../../utils/mergeRefs'; export interface LazyImageProps extends React.ComponentProps<'img'>, @@ -44,7 +44,7 @@ export const LazyImage = forwardRef( rootMargin, }); - return ; + return ; } );