-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacement for template strings does not work #8
Comments
@leifmarcus Thanks for your feedback, the fix version 0.4.3 has been released. |
Still encounter this problem with 1.0.0. |
@modten Yes, you might be right. Can you open a new issue with some example code and your build target? |
@joarfish Sorry, I think there is no need to delve into this problem, because after I use the latest versions of vite and terser, this problem no longer exists. The steps that caused the original problem were to use e=`/__dynamic_base__/${e}` const HelloWorld = defineAsyncComponent(() => import(`./components/HelloWorld.vue`)) {
build: {
minify: "terser"
}
} |
This addresses issue chenxch#8. Signed-off-by: Jonas Klein <giga@jonasklein.dev>
When bundling the application for production with the terser minifier, the
__dynamic_base__
is not overridden, when it appears inside a template string like/__dynamic_base__/${e}
. (After the compression, the preload helper will have a code like that for saving deps, that are already loaded).This is related to the
replaceQuotes
function inside the plugin utils.vite-plugin-dynamic-base/src/core/utils.ts
Line 8 in 90b1969
A suggested change would be:
The text was updated successfully, but these errors were encountered: