Fix: production builds break Icon component when SVGs are loaded as inline code. Adjusted vite.config.js. Updated the Node.js version in Dockerfile
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM node:22.5.1-alpine AS builder
|
FROM node:22.6.0-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ COPY . .
|
|||||||
RUN npm run build --env-file=production.env
|
RUN npm run build --env-file=production.env
|
||||||
RUN npm prune --omit=dev
|
RUN npm prune --omit=dev
|
||||||
|
|
||||||
FROM node:22.5.1-alpine AS deployer
|
FROM node:22.6.0-alpine AS deployer
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@@ -2,5 +2,10 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
assetsInlineLimit: (file) => {
|
||||||
|
return !file.endsWith('.svg');
|
||||||
|
}
|
||||||
|
},
|
||||||
plugins: [sveltekit()]
|
plugins: [sveltekit()]
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user