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

sub folder in external pkg is not treated as external #3129

Closed
JounQin opened this issue Sep 24, 2019 · 2 comments
Closed

sub folder in external pkg is not treated as external #3129

JounQin opened this issue Sep 24, 2019 · 2 comments

Comments

@JounQin
Copy link

@JounQin JounQin commented Sep 24, 2019

  • Rollup Version: 1.21.4
  • Operating System (or Browser): macOS Mojave
  • Node Version: v12.10.0

How Do We Reproduce?

https://github.com/rx-ts/eslint-mdx/blob/master/packages/eslint-plugin-mdx/src/rules/no-unescaped-entities.ts#L5

https://github.com/rx-ts/eslint-mdx/blob/master/package.json#L14

eslint-plugin-react has been marked as external automatically, but if we remove eslint-plugin-react/lib/rules/no-unescaped-entities from externals, it will not be treated as external automatically.

Expected Behavior

Treat sub folder from external as external automatically when targetting cjs or esm format, or add an option to do it.

Actual Behavior

As title and description above.

@lukastaegert

This comment has been minimized.

Copy link
Member

@lukastaegert lukastaegert commented Sep 24, 2019

The usual way to solve this is to make external a function and use something like id.startsWith(...).

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Sep 24, 2019

Wow, I just didn't know external could be a function previously, thanks for your reply! Then I think this issue can be closed.

@JounQin JounQin closed this Sep 24, 2019
JounQin added a commit to 1stG/configs that referenced this issue Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.