Skip to content

[Bug]: Bundleless mode ouput files outside of the specified entries #498

@patricklafrance

Description

@patricklafrance

Version

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

Details

When Rslib is configured to ouput bundleless files, it also generate dts files for folders that are outside of my entry point (the tests folder and the tooling configuration files like jest.config.ts). Is it a known issue or i'm I missing a configuration?

I am using version 0.1.0 and my config is:

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

I also tried without success:

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

Image

Reproduce Steps

  • rslib build

Metadata

Metadata

Assignees

No one assigned

    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