mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
docs(transformer/module_imports): update outdated comments (#6574)
Follow-up https://github.com/oxc-project/oxc/pull/6560
This commit is contained in:
parent
d11770d552
commit
448388ac9a
1 changed files with 9 additions and 11 deletions
|
|
@ -11,21 +11,19 @@
|
|||
//!
|
||||
//! ```rs
|
||||
//! // import { jsx as _jsx } from 'react';
|
||||
//! self.ctx.module_imports.add_import(
|
||||
//! self.ctx.module_imports.add_named_import(
|
||||
//! Atom::from("react"),
|
||||
//! ImportKind::new_named(Atom::from("jsx"), Atom::from("_jsx"), symbol_id)
|
||||
//! Atom::from("jsx"),
|
||||
//! Atom::from("_jsx"),
|
||||
//! symbol_id
|
||||
//! );
|
||||
//!
|
||||
//! // import React from 'react';
|
||||
//! self.ctx.module_imports.add_import(
|
||||
//! // ESM: import React from 'react';
|
||||
//! // CJS: var _React = require('react');
|
||||
//! self.ctx.module_imports.add_default_import(
|
||||
//! Atom::from("react"),
|
||||
//! ImportKind::new_default(Atom::from("React")), symbol_id)
|
||||
//! );
|
||||
//!
|
||||
//! // var _react = require('react');
|
||||
//! self.ctx.module_imports.add_require(
|
||||
//! Atom::from("react"),
|
||||
//! ImportKind::new_default(Atom::from("_react"), symbol_id)
|
||||
//! Atom::from("React"),
|
||||
//! symbol_id
|
||||
//! );
|
||||
//! ```
|
||||
//!
|
||||
|
|
|
|||
Loading…
Reference in a new issue