Skip to content

Commit 550a9fd

Browse files
committed
fix: avoid partial names replacement
1 parent 87aadd9 commit 550a9fd

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

__tests__/__snapshots__/index.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,9 +2538,14 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
25382538
script$3.render = render$3;
25392539
25402540
function checkBenchieSupport() {
2541-
const isProduction = process.env.NODE_ENV === 'production';
2542-
if (!isProduction) return false
2543-
return typeof t !== 'undefined' && typeof $__CDN !== 'undefined' && typeof t === 'function' && typeof $__CDN === 'string'
2541+
const isProduction = process.env.NODE_ENV === 'production';
2542+
if (!isProduction) return false
2543+
return (
2544+
typeof t !== 'undefined' &&
2545+
typeof $__CDN !== 'undefined' &&
2546+
typeof t === 'function' &&
2547+
typeof $__CDN === 'string'
2548+
)
25442549
}
25452550
25462551
const hasBenchieSupport$1 = checkBenchieSupport();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"@commitlint/prompt-cli": "^11.0.0",
6161
"@pathscale/bulma-extensions-css-var": "^0.0.41",
6262
"@pathscale/bulma-pull-2981-css-var-only": "^0.9.6",
63-
"@pathscale/vue3-ui": "^0.8.123",
63+
"@pathscale/vue3-ui": "^0.8.124",
6464
"@rollup/plugin-babel": "^5.2.2",
6565
"@rollup/plugin-commonjs": "^17.0.0",
6666
"@rollup/plugin-json": "^4.1.0",

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyzer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function analyze(
134134
function resolveSource(id: string, value: string): string | undefined {
135135
// Resolve aliases
136136
for (const [from, to] of Object.entries(alias)) {
137-
if (!value.startsWith(from)) continue;
137+
if (value !== from && !value.startsWith(`${from}/`)) continue;
138138
value = to + value.slice(from.length);
139139
}
140140

0 commit comments

Comments
 (0)