declare externals directly in package.json to get them properly generated in web-test-runner.config.mjs to prevent @web/test-runner from falling back to package.json which doesn't necessarily exist

This commit is contained in:
Jacob Overgaard
2024-02-12 09:45:06 +01:00
parent 0c46828b4c
commit 37babc013a
3 changed files with 41 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ export const createImportMap = (args) => {
// replace ./dist-cms with src and remove /index.js
const modulePath = value.replace(/^\.\/dist-cms/, args.rootDir).replace('.js', '.ts');
console.log('replacing', value, 'with', modulePath)
const importAlias = `${packageJsonName}/${moduleName}`;
imports[importAlias] = modulePath;