* Renders chunk import. * @param {Compilation} compilation the compilation instance * @param {Chunk} chunk the chunk to render the import for * @param {string=} namedImport the named import to use for the import * @param {Chunk=} runtimeChunk the runtime chunk * @returns {string} the import sou
(compilation, chunk, namedImport, runtimeChunk)
| 78 | * @returns {string} the import source |
| 79 | */ |
| 80 | function renderChunkImport(compilation, chunk, namedImport, runtimeChunk) { |
| 81 | return `import ${namedImport ? `* as ${namedImport}` : `{ ${RuntimeGlobals.require} }`} from ${JSON.stringify( |
| 82 | getRelativePath(compilation, chunk, runtimeChunk || chunk) |
| 83 | )};\n`; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Gets chunk named import. |
no test coverage detected