Skip to content

Extensionless imports in rollup.config.js with --bundleConfigAsCjs stopped working in 4.49.0. #6083

@jansiegel

Description

@jansiegel

Rollup Version

4.49.0

Operating System (or Browser)

MacOS 15

Node Version (if applicable)

22

Link To Reproduction

https://stackblitz.com/edit/stackblitz-starters-1qeevjke?file=package.json

Expected Behaviour

Using the --bundleConfigAsCjs command line option used to allow importing local files without extensions (e.g., import { baseConfig } from './conf/base';) in rollup.config.js.

Demo: https://stackblitz.com/edit/stackblitz-starters-dk3pevw7?file=package.json

Actual Behaviour

Since 4.49.0, this stopped working and throws an error of:

[!] Error: Could not load ./conf/base (imported by rollup.config.js): ENOENT: no such file or directory, open './conf/base'

Demo: https://stackblitz.com/edit/stackblitz-starters-1qeevjke?file=package.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions