SOL
FIND
Web Lens
Portal home
Home
|
New Lens
|
About
Web address:
@babel/plugin-syntax-module-blocks · Babel
https://babeljs.io/docs/babel-plugin-syntax-module-blocks • 32 KB fetched
Open original page
@babel/plugin-syntax-module-blocks · Babel Skip to main content Docs Setup Try it out Videos Blog Search Donate Team GitHub * Modules * TC39 Proposals * Stage 3 * Early stages * async-do-expressions * destructuring-private * discard-binding * do-expressions * export-default-from * function-bind * function-sent * import-defer * optional-chaining-assign * partial-application * pipeline-operator * record-and-tuple * throw-expressions * syntax-module-blocks * Web Compatibility * * TC39 Proposals * Early stages * syntax-module-blocks On this page @babel/plugin-syntax-module-blocks Example This plugin enables @babel/parser to parse module declarations module countModule { let i = 0 ; export function count ( ) { i ++ ; return i ; } } It requires @babel/parser@^7.13.0 . Installation * npm * Yarn * pnpm * Bun npm install --save-dev @babel/plugin-syntax-module-blocks yarn add --dev @babel/plugin-syntax-module-blocks pnpm add --save-dev @babel/plugin-syntax-module-blocks bun add --dev @babel/plugin-syntax-module-blocks Usage With a configuration file (Recommended) babel.config.json { "plugins" : [ "@babel/plugin-syntax-module-blocks" ] } Via CLI Shell babel --plugins @babel/plugin-syntax-module-blocks script.js Via Node API JavaScript require ( "@babel/core" ) . transformSync ( "code" , { plugins : [ "@babel/plugin-syntax-module-blocks" ] , } ) ; Edit this page Previous throw-expressions Next import-attributes-to-assertions * Example * Installation * Usage * With a configuration file (Recommended) * Via CLI * Via Node API Docs * Learn ES2015 Community * Videos * User Showcase * Stack Overflow * Slack Channel * X (Twitter) * Bluesky More * Blog * GitHub Org * GitHub Repo * Website Repo * Old 7.x Site * Old 6.x Site * Old 5.x Site
Links found on this page
Skip to main content
[
direct
]
Docs
[
direct
]
Setup
[
direct
]
Try it out
[
direct
]
Videos
[
direct
]
Blog
[
direct
]
Donate
[
direct
]
Team
[
direct
]
GitHub
[
direct
]
Modules
[
direct
]
TC39 Proposals
[
direct
]
Early stages
[
direct
]
destructuring-private
[
direct
]
discard-binding
[
direct
]
do-expressions
[
direct
]
export-default-from
[
direct
]
function-bind
[
direct
]
function-sent
[
direct
]
import-defer
[
direct
]
optional-chaining-assign
[
direct
]
partial-application
[
direct
]
pipeline-operator
[
direct
]
record-and-tuple
[
direct
]
throw-expressions
[
direct
]
Web Compatibility
[
direct
]
Edit this page
[
direct
]
Learn ES2015
[
direct
]
User Showcase
[
direct
]
Stack Overflow
[
direct
]
Slack Channel
[
direct
]
X (Twitter)
[
direct
]
Bluesky
[
direct
]
GitHub Org
[
direct
]
Website Repo
[
direct
]
Old 7.x Site
[
direct
]
Old 6.x Site
[
direct
]
Old 5.x Site
[
direct
]
SolFind Lens does not relay logins, forms, files, images, audio, or video.
Portal home
With content from
Curlie.org
- the largest human-edited directory of the web. Contribute by submitting a website or becoming an editor.