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

Broken links #2755

Closed
ipa1981 opened this issue Mar 11, 2023 · 7 comments
Closed

Broken links #2755

ipa1981 opened this issue Mar 11, 2023 · 7 comments

Comments

@ipa1981
Copy link

ipa1981 commented Mar 11, 2023

Not sure which side contains the problem, but NPM page (https://www.npmjs.com/package/@babel/helper-create-regexp-features-plugin ) contains the broken link to Babel docs: https://babeljs.io/docs/en/babel-helper-create-regexp-features-plugin

@babel-bot
Copy link
Contributor

Hey @ipa1981! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

@JLHwung
Copy link
Contributor

JLHwung commented Mar 11, 2023

Some of the helper functions we use in Babel's internal processes don't have documentation available. However, you can still check out the source code for @babel/helper-create-regexp-features-plugin here.

To provide some context, the helper serves as a plugin factory for all supported regular expression (regexp) features. If you enable multiple regexp plugins, it ensures that the actual regexp transform runs only once.

That said, docs PR on helpers is welcome.

@ipa1981
Copy link
Author

ipa1981 commented Mar 12, 2023

@JLHwung thanks for a quick comment. In my case, I see this helper in package.json, but no imports in the project and thus I have no idea what it does and whether it should be there or it is safe to remove. Thus I was looking for docs to find a clue, what it solves for the user scope, but maybe you can comment?

  "dependencies": {
    "@babel/core": "^7.6.4",
    "@babel/helper-create-regexp-features-plugin": "^7.14.5",
    "@babel/plugin-syntax-dynamic-import": "7.x",
    "@babel/plugin-transform-runtime": "^7.14.3",
    "@babel/runtime": "^7.14.0",

@JLHwung
Copy link
Contributor

JLHwung commented Mar 13, 2023

@ipa1981 If you are not using this helper, you can safely remove that from your package.json. I guess it was installed so that the helper, as a transitive dependency of regexp plugins, can be upgraded.

@ipa1981
Copy link
Author

ipa1981 commented Mar 13, 2023

Thank you. Will try to remove it and see if nothing is broken. It's hard to say if it's used or not. As neither plugin-syntax-dynamic-import and plugin-transform-runtime are imported in the code as well, so maybe it's safe. I'm closing this issue to keep the list clean

@ipa1981 ipa1981 closed this as completed Mar 13, 2023
@JLHwung
Copy link
Contributor

JLHwung commented Mar 13, 2023

As neither plugin-syntax-dynamic-import and plugin-transform-runtime are imported in the code as well

Well they are different, Babel config supports shorthand plugin specifier so plugins: ["syntax-dynamic-import"] will also import the plugin. But that is not the case for @babel/helper-*.

As for plugin-syntax-dynamic-import, you can safely remove it if you upgrade @babel/core to 7.8.0 or above.

@ipa1981
Copy link
Author

ipa1981 commented Mar 13, 2023

Thanks. Neither shorthands found in the project code as well. Hence it uses Laravel Mix and Webpack, with vast amount of under the hood internal Babel dependencies. We just removed all the babel from direct dependencies to test and it looks no build errors happens so far. Let's hope nothing gets broken :).

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

3 participants