Skip to content

Commit

Permalink
refactor: improve registry id normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Dec 17, 2024
1 parent d5bd515 commit 6a235a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/afraid-laws-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@marko/compiler": patch
"marko": patch
"@marko/runtime-tags": patch
---

Improve registry id normalization.
2 changes: 1 addition & 1 deletion packages/compiler/src/babel-utils/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function resolveMarkoFile(file, filename) {
const idCache = new WeakMap();
const templateIdHashOpts = { outputLength: 5 };
export function getTemplateId(opts, request, child) {
const id = relative(ROOT, request);
const id = relative(ROOT, request).replace(/[^a-zA-Z0-9_$./-]/g, "/");
const optimize = typeof opts === "object" ? opts.optimize : opts;

if (optimize) {
Expand Down

0 comments on commit 6a235a8

Please sign in to comment.