mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
fix: regexp for swapping dev/prod runtimes (#1845)
This commit is contained in:
parent
22e48e505f
commit
65bab8e6df
8
.changeset/red-spoons-flash.md
Normal file
8
.changeset/red-spoons-flash.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
"@marko/babel-utils": patch
|
||||
"@marko/compiler": patch
|
||||
"marko": patch
|
||||
"@marko/translator-default": patch
|
||||
---
|
||||
|
||||
Fix issue where Marko runtime was being incorrectly matched when swapping from dev to prod runtimes.
|
||||
@ -11,7 +11,10 @@ export function resolveRelativePath(file, request) {
|
||||
}
|
||||
|
||||
if (file.markoOpts.optimize) {
|
||||
request = request.replace(/(^|\/)marko\/src\//, "$1marko/dist/");
|
||||
request = request.replace(
|
||||
/(^|\/node-modules\/)marko\/src\//,
|
||||
"$1marko/dist/"
|
||||
);
|
||||
}
|
||||
|
||||
return request;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user