Skip to content

__dirname and import.meta in plugins #2953

@jakearchibald

Description

@jakearchibald
  • Rollup Version: 1.15.6
  • Operating System (or Browser): OSX
  • Node Version: v12.4.0

How Do We Reproduce?

In /whatever/rollup.config.js:

import plugin from './lib/plugin.js';

In /whatever/lib/plugin.js:

console.log(__dirname);
console.log(import.meta.url);

Expected Behavior

Logs:

  • /whatever/lib
  • file:///whatever/lib/plugin.js

Actual Behavior

Logs:

  • /whatever
  • file:///whatever/rollup.config.js

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