Skip to content

[Bug]: Target "node" output a static folder with bad exports #499

@patricklafrance

Description

@patricklafrance

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
    Memory: 8.92 GB / 31.62 GB
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Details

I am using version 0.1.0 of Rslib.

When my config has target: "node", Rslib seems to output a static/assets/index.ts file. My project doesn't include any assets. The content of this static/assets/index.ts match the content of the src/index.ts file:

export * from "./defineConfig.ts";
export * from "./exports.ts";

Here's my Rslib config:

export default defineConfig({
    lib: [{
        format: "esm",
        syntax: "esnext",
        bundle: true,
        dts: {
            bundle: true
        }
    }],
    source: {
        entry: {
            index: "./src/index.ts",
            sharedDependenciesResolutionPlugin: "./src/sharedDependenciesResolutionPlugin.ts",
            nonCacheableRemoteEntryPlugin: "./src/nonCacheableRemoteEntryPlugin.ts"
        }
    },
    output: {
        target: "node",
        distPath: {
            root: "./dist"
        },
        cleanDistPath: true,
        minify: false
    },
    tools: {
        htmlPlugin: false
    }
});

Image

Image

Reproduce Steps

  • rslib build

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions