-
-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Version
"@rslib/core": "^0.0.15",
Details
错误:
× Failed to build.
error TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
示例代码:
import {LibConfig, RslibConfig, build as rsLibBuild} from "@rslib/core";
async function buildFun(): Promise<any> {
console.log("build")
const defaultConfig: RslibConfig = {
lib: [
{
format: 'esm',
source: {
entry: {
index: [path.resolve(process.cwd(), './src/**')],
}
},
output: {
distPath: {
root: path.resolve(process.cwd(), './lib/esm'),
}
},
}
],
plugins: [
pluginReact({
swcReactOptions: {
runtime: 'classic',
},
}),
pluginSass(),
],
}
console.log("构建配置")
console.log(JSON.stringify(defaultConfig, null, 2))
await rsLibBuild(defaultConfig);
}
Reproduce link
https://github.com/canyuegongzi/rslib-example-bug
Reproduce Steps
1: npm install
2: npm run build:script
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working