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

RollupError: Entry module "./src/node/index.ts" cannot be external. #20

Closed
hazae41 opened this issue Feb 3, 2023 · 1 comment
Closed

Comments

@hazae41
Copy link

hazae41 commented Feb 3, 2023

Since latest update 5.1.0 -> 5.1.1, I have this error when building

./src/node/index.ts → ./dist/esm, ./dist/cjs...
[!] RollupError: Entry module "./src/node/index.ts" cannot be external.

My config

  {
    input: "./src/node/index.ts",
    output: [{
      dir: "./dist/esm",
      format: "esm",
      exports: "named",
      preserveModules: true,
      sourcemap: true,
      entryFileNames: "[name].mjs",
    }, {
      dir: "./dist/cjs",
      format: "cjs",
      exports: "named",
      preserveModules: true,
      sourcemap: true,
      entryFileNames: "[name].cjs",
    }],
    plugins: [externals(), ts()]
  },

Maybe it's related to the patch Consider an empty include option means 'includes all'.

@Septh
Copy link
Owner

Septh commented Feb 3, 2023

You're absolutely right. I should have written some test for this case.

Thanks for reporting. This is fixed in the upcoming 5.1.2.

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

No branches or pull requests

2 participants