mirror of
https://github.com/google/blockly.git
synced 2026-01-18 14:27:12 +01:00
chore(tests): Add ".loader" infix to shim filenames.
Per suggestion on PR #7380, have buildShims name the shims ${chunk.name}.loader.mjs instead of just `${chunk.name}.mjs`.
This commit is contained in:
@@ -677,7 +677,8 @@ function buildCompiled() {
|
||||
/**
|
||||
* This task builds the shims used by the playgrounds and tests to
|
||||
* load Blockly in either compressed or uncompressed mode, creating
|
||||
* build/blockly.mjs, blocks.mjs, javascript.mjs, etc.
|
||||
* build/blockly.loader.mjs, blocks.loader.mjs, javascript.loader.mjs,
|
||||
* etc.
|
||||
*
|
||||
* Prerequisite: getChunkOptions (via buildCompiled, for chunks[].parent).
|
||||
*/
|
||||
@@ -702,7 +703,7 @@ async function buildShims() {
|
||||
const modulePath = posixPath(chunk.moduleEntry ?? chunk.entry);
|
||||
const scriptPath =
|
||||
path.posix.join(RELEASE_DIR, `${chunk.name}${COMPILED_SUFFIX}.js`);
|
||||
const shimPath = path.join(BUILD_DIR, `${chunk.name}.mjs`);
|
||||
const shimPath = path.join(BUILD_DIR, `${chunk.name}.loader.mjs`);
|
||||
const parentImport =
|
||||
chunk.parent ? `import ${quote(`./${chunk.parent.name}.mjs`)};` : '';
|
||||
const exports = await import(`../../${modulePath}`);
|
||||
|
||||
Reference in New Issue
Block a user