Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: output.filename.js is not working even when autoExtension is false #106

Closed
xc2 opened this issue Aug 16, 2024 · 1 comment · Fixed by #108
Closed

[Bug]: output.filename.js is not working even when autoExtension is false #106

xc2 opened this issue Aug 16, 2024 · 1 comment · Fixed by #108

Comments

@xc2
Copy link
Contributor

xc2 commented Aug 16, 2024

Version

System:
    OS: macOS 15.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 53.33 MB / 32.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Browsers:
    Chrome: 127.0.6533.120
  npmPackages:
    @rslib/core: 0.0.2 => 0.0.2

Details

import { defineConfig } from "@rslib/core";

export default defineConfig({
  source: {
    entry: {
      index: './src/index.ts',
    },
  },
  output: {
    distPath: {
      root: './dist'
    }
  },
  lib: [
    {
      format: "cjs",
      dts: { bundle: false },
      autoExtension: false,
      output: {
        filename: {
          js: '[name].cjs'
        }
      }
    },
    {
      format: "esm",
      dts: false,
    },
  ],
});

Reproduce link

Reproduce Steps

expected dist/index.cjs but got dist/index.js

@Timeless0911
Copy link
Contributor

Got it, I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants