docs: update formatting for mdx3 compatibility (#42099)
* docs: update formatting for mdx3 compatibility (#42052) docs: update formatting for mdx3 compat * escape curly braces
This commit is contained in:
parent
8969189a72
commit
9d7b2003e3
9 changed files with 13 additions and 10 deletions
|
@ -78,7 +78,8 @@ JavaScript transpilers (e.g. Babel, TypeScript) have historically supported ES M
|
|||
syntax before Node.js supported ESM imports by turning these calls to CommonJS
|
||||
`require` calls.
|
||||
|
||||
<details><summary>Example: @babel/plugin-transform-modules-commonjs</summary>
|
||||
<details>
|
||||
<summary>Example: @babel/plugin-transform-modules-commonjs</summary>
|
||||
|
||||
The `@babel/plugin-transform-modules-commonjs` plugin will transform
|
||||
ESM imports down to `require` calls. The exact syntax will depend on the
|
||||
|
|
|
@ -121,7 +121,7 @@ need to install Node.js themselves as a prerequisite to running your app.
|
|||
|
||||
To check which version of Node.js is running in your app, you can access the global
|
||||
[`process.versions`][] variable in the main process or preload script. You can also reference
|
||||
<https://releases.electronjs.org/releases.json>.
|
||||
[https://releases.electronjs.org/releases.json](https://releases.electronjs.org/releases.json).
|
||||
|
||||
:::
|
||||
|
||||
|
|
|
@ -222,7 +222,8 @@ with CommonJS module syntax:
|
|||
- [app][app], which controls your application's event lifecycle.
|
||||
- [BrowserWindow][browser-window], which creates and manages app windows.
|
||||
|
||||
<details><summary>Module capitalization conventions</summary>
|
||||
<details>
|
||||
<summary>Module capitalization conventions</summary>
|
||||
|
||||
You might have noticed the capitalization difference between the **a**pp
|
||||
and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here,
|
||||
|
@ -231,7 +232,8 @@ Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRende
|
|||
|
||||
</details>
|
||||
|
||||
<details><summary>Typed import aliases</summary>
|
||||
<details>
|
||||
<summary>Typed import aliases</summary>
|
||||
|
||||
For better type checking when writing TypeScript code, you can choose to import
|
||||
main process modules from `electron/main`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue