-
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Copy link
Description
Version
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M1 Pro
Memory: 172.78 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 131.0.6778.205
Safari: 18.2
npmPackages:
@rslib/core: ^0.2.2 => 0.2.2Details
Package as a component src/index as the main entry component
If you set the index to ./src/index.tsx, there will be no error (there is no content in ESM, CJS)
If you set the index to ./src/**, there will be a problem with the above screenshots
import { pluginReact } from '@rsbuild/plugin-react';
import { defineConfig } from '@rslib/core';
export default defineConfig({
source: {
entry: {
index: ['./src/**'],
},
},
lib: [
{
bundle: false,
dts: true,
format: 'esm',
output: {
distPath: {
root: './dist/esm',
},
minify: true,
},
},
{
bundle: false,
dts: true,
format: 'cjs',
output: {
distPath: {
root: './dist/cjs',
},
minify: true,
},
},
{
format: 'umd',
umdName: 'rsCom',
output: {
externals: {
react: 'rsCom',
},
distPath: {
root: './dist/umd',
},
},
},
],
output: {
target: 'web',
},
plugins: [pluginReact()],
});
Reproduce link
https://github.com/yoke0104x/temp.git
Reproduce Steps
simple steps
- cd rs_com
- pnpm i
- pnpm build
- you can see the error message
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
