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

Add additional information for plugin-syntax-dynamic-import #2197

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/plugin-syntax-dynamic-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ title: @babel/plugin-syntax-dynamic-import
sidebar_label: syntax-dynamic-import
---

`@babel/plugin-syntax-dynamic-import` is needed to enable parsing for import().
gunn4r marked this conversation as resolved.
Show resolved Hide resolved
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

In Babel 7.8.0 it's enabled by default, so this plugin shouldn't be needed if you are using `@babel/core@>7.8.0`.
gunn4r marked this conversation as resolved.
Show resolved Hide resolved
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

If you want to transpile import():
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

1. If you are using `@babel/preset-env`, it's automatically handled
2. If you are using Webpack or Rollup, you shouldn't transpile import() with Babel and let the bundler handle it for you
3. Otherwise, you need `@babel/plugin-proposal-dynamic-import`


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gunn4r Can you rebase on upstream? We have removed versioned_docs so I think only this section is required.

## Installation

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ sidebar_label: syntax-dynamic-import
original_id: babel-plugin-syntax-dynamic-import
---

`@babel/plugin-syntax-dynamic-import` is needed to enable parsing for import().
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

In Babel 7.8.0 it's enabled by default, so this plugin shouldn't be needed if you are using `@babel/core@>7.8.0`.

If you want to transpile import():

1. If you are using `@babel/preset-env`, it's automatically handled
2. If you are using Webpack or Rollup, you shouldn't transpile import() with Babel and let the bundler handle it for you
3. Otherwise, you need `@babel/plugin-proposal-dynamic-import`

## Installation

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ sidebar_label: syntax-dynamic-import
original_id: babel-plugin-syntax-dynamic-import
---

`@babel/plugin-syntax-dynamic-import` is needed to enable parsing for import().

In Babel 7.8.0 it's enabled by default, so this plugin shouldn't be needed if you are using `@babel/core@>7.8.0`.
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

If you want to transpile import():

1. If you are using `@babel/preset-env`, it's automatically handled
2. If you are using Webpack or Rollup, you shouldn't transpile import() with Babel and let the bundler handle it for you
3. Otherwise, you need `@babel/plugin-proposal-dynamic-import`

## Installation

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ sidebar_label: syntax-dynamic-import
original_id: babel-plugin-syntax-dynamic-import
---

`@babel/plugin-syntax-dynamic-import` is needed to enable parsing for import().

In Babel 7.8.0 it's enabled by default, so this plugin shouldn't be needed if you are using `@babel/core@>7.8.0`.
gunn4r marked this conversation as resolved.
Show resolved Hide resolved

If you want to transpile import():

1. If you are using `@babel/preset-env`, it's automatically handled
2. If you are using Webpack or Rollup, you shouldn't transpile import() with Babel and let the bundler handle it for you
3. Otherwise, you need `@babel/plugin-proposal-dynamic-import`

## Installation

```sh
Expand Down