@yahoo/uds-create-loader 2.45.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/loader/artifacts.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/next.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/loader/artifacts.ts +4 -1
- package/src/loader.test.ts +34 -58
- package/src/loader.ts +13 -3
- package/src/next.test.ts +9 -6
- package/src/next.ts +5 -5
- package/dist/inspect-transform.js +0 -63
package/dist/loader/artifacts.js
CHANGED
|
@@ -51,7 +51,7 @@ const projectionCache = /* @__PURE__ */ new WeakMap();
|
|
|
51
51
|
function getLoaderProjection(config) {
|
|
52
52
|
const cached = projectionCache.get(config);
|
|
53
53
|
if (cached) return cached;
|
|
54
|
-
const components = config.
|
|
54
|
+
const components = config.items?.component ?? {};
|
|
55
55
|
const projection = { componentNames: new Set(Object.keys(components)) };
|
|
56
56
|
projectionCache.set(config, projection);
|
|
57
57
|
return projection;
|
package/dist/loader.js
CHANGED
|
@@ -29,7 +29,7 @@ const transformLoader = function(source) {
|
|
|
29
29
|
if (!skipWatchDependencies) loaderContext.addDependency?.(dataPath);
|
|
30
30
|
const config = loadUdsConfig(dataPath, isDev);
|
|
31
31
|
if (!config) return source;
|
|
32
|
-
const registryRel = resolveRegistryDir(config.
|
|
32
|
+
const registryRel = resolveRegistryDir(config.items?.settings?.settings?.build);
|
|
33
33
|
if (resourcePath.replace(/\\/g, "/").includes(`/${registryRel}/`)) return source;
|
|
34
34
|
const projection = getLoaderProjection(config);
|
|
35
35
|
let hasComponentReference = false;
|
package/dist/next.js
CHANGED
|
@@ -15,7 +15,7 @@ function resolveLoaderPath() {
|
|
|
15
15
|
function readRegistryDeps(outputDir) {
|
|
16
16
|
let buildOptions;
|
|
17
17
|
try {
|
|
18
|
-
buildOptions = JSON.parse(readFileSync(path.resolve(process.cwd(), outputDir, "config.json"), "utf-8")).
|
|
18
|
+
buildOptions = JSON.parse(readFileSync(path.resolve(process.cwd(), outputDir, "config.json"), "utf-8")).items?.settings?.settings?.build;
|
|
19
19
|
} catch {
|
|
20
20
|
return null;
|
|
21
21
|
}
|