-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node-loader: add support for options w/
initialize
- Loading branch information
Showing
4 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import {createLoader as createMdxLoader} from '@mdx-js/node-loader' | ||
import {createLoader as createJsxLoader} from '../script/jsx-loader.js' | ||
import config from './mdx-config.js' | ||
import {initialize, load} from './mdx-loader.js' | ||
|
||
const loader = {loaders: [createJsxLoader(), createMdxLoader(config)]} | ||
const loader = {loaders: [createJsxLoader(), {initialize, load}]} | ||
export default loader | ||
|
||
// To do: after dropping Node 18: | ||
// import {register} from 'node:module' | ||
|
||
// register('../script/jsx-loader.js', import.meta.url) | ||
// register('./mdx-loader.js', import.meta.url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters