Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): resolve tilde-alias SVG URLs at build time (#42654)

chenshiyangd6491af103d5
diff --git a/web/vite.config.ts b/web/vite.config.ts
index 217228dd98a..8d95a0f697e 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -66,6 +66,16 @@ export default defineConfig(({ command, mode, isPreview }) => {
tailwindcss(),
react(),
vinext({ react: false }),
+ {
+ name: 'dify-css-asset-alias',
+ enforce: 'post',
+ // Prepend after Vinext's tsconfig aliases, which skip CSS resolution.
+ config: () => ({
+ resolve: {
+ alias: [{ find: '~@', replacement: projectRoot }],
+ },
+ }),
+ },
customI18nHmrPlugin({ injectTarget: rootClientInjectTarget }),
// reactGrabOpenFilePlugin({
// injectTarget: rootClientInjectTarget,