@marko/runtime-tags 6.3.9 → 6.3.10

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.
@@ -8854,11 +8854,14 @@ var import_declaration_default = {
8854
8854
  const tags = importDecl.hub.file.metadata.marko.tags;
8855
8855
  if (!tags.includes(tagImport)) tags.push(tagImport);
8856
8856
  }
8857
- const loadAttrValuePath = node.attributes?.length && importDecl.get("attributes").find((p) => (p.node.key.type === "Identifier" ? p.node.key.name : p.node.key.value) === "load")?.get("value");
8858
- if (loadAttrValuePath) {
8859
- (node.extra ??= {}).loadImport = getLoadImportConfig(loadAttrValuePath);
8857
+ const loadAttrPath = node.attributes?.length ? importDecl.get("attributes").find((p) => (p.node.key.type === "Identifier" ? p.node.key.name : p.node.key.value) === "load") : void 0;
8858
+ if (loadAttrPath) {
8859
+ if (!getMarkoOpts().linkAssets) {
8860
+ loadAttrPath.remove();
8861
+ return;
8862
+ }
8863
+ (node.extra ??= {}).loadImport = getLoadImportConfig(loadAttrPath.get("value"));
8860
8864
  const { file } = importDecl.hub;
8861
- if (!getMarkoOpts().linkAssets) throw importDecl.buildCodeFrameError("The `load` import attribute requires the `linkAssets` compiler option to be configured.");
8862
8865
  if (!(tagImport && (0, _marko_compiler_babel_utils.loadFileForImport)(file, value))) throw importDecl.buildCodeFrameError("Unable to resolve marko file for load import.");
8863
8866
  if ((node.importKind || "value") !== "value") throw importDecl.buildCodeFrameError("Invalid load import.");
8864
8867
  for (const specifier of importDecl.get("specifiers")) if (!_marko_compiler.types.isImportDefaultSpecifier(specifier.node)) throw specifier.buildCodeFrameError("Invalid load import, only a default specifier is allowed.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "6.3.9",
3
+ "version": "6.3.10",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",