MCPcopy
hub / github.com/vercel/next.js / importPlugin

Function importPlugin

packages/next-mdx/mdx-js-loader.js:18–26  ·  view source on GitHub ↗
(plugin, projectRoot)

Source from the content-addressed store, hash-verified

16}
17
18async function importPlugin(plugin, projectRoot) {
19 if (Array.isArray(plugin) && typeof plugin[0] === 'string') {
20 plugin[0] = await importPluginForPath(plugin[0], projectRoot)
21 }
22 if (typeof plugin === 'string') {
23 plugin = await importPluginForPath(plugin, projectRoot)
24 }
25 return plugin
26}
27
28async function getOptions(options, projectRoot) {
29 const {

Callers 1

getOptionsFunction · 0.85

Calls 2

importPluginForPathFunction · 0.85
isArrayMethod · 0.80

Tested by

no test coverage detected