Skip to content

Commit

Permalink
chore: fix build and reduce image size
Browse files Browse the repository at this point in the history
  • Loading branch information
kernoeb committed Jan 24, 2024
1 parent dc559c1 commit b049b62
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!bun.lockb

# UI files
!vuetify.options.js
!nuxt.config.js
!pages/
!assets/
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ RUN npm run build
RUN rm -rf ./node_modules/

# Only production dependencies
RUN npm prune --omit=dev && npm cache clean --force
RUN npm ci --omit=dev && npm cache clean --force
RUN rm -rf node_modules/.cache

# Clean node_modules, one of the heaviest object in the universe
RUN clean-modules --yes "**/*.d.ts" "**/@types/**" "!**/*.mustache"
RUN clean-modules --yes "**/*.d.ts" "**/@types/**" "prettier/esm/*" "rxjs/src/**" "rxjs/bundles/**" "rxjs/_esm5/**" "rxjs/_esm2015/**" "!**/*.mustache"

FROM node-base as app

Expand Down
18 changes: 0 additions & 18 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ const DOMAIN = 'planningsup.app'
const URL = 'https://' + DOMAIN
const BANNER = `${URL}/banner.png`

const themeColors = {
primary: '#1976d2',
accent: '#424242',
secondary: '#ff8f00',
info: '#26a69a',
warning: '#ffc107',
error: '#dd2c00',
success: '#00e676'
}

export default {
telemetry: false,
ssr: true,
Expand Down Expand Up @@ -232,14 +222,6 @@ export default {
treeShake: true,
defaultAssets: false,
customVariables: ['~/assets/variables.scss'],
theme: {
dark: true,
options: { customProperties: true },
themes: {
dark: themeColors,
light: themeColors
}
},
optionsPath: './vuetify.options.js'
},

Expand Down
20 changes: 19 additions & 1 deletion vuetify.options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import { fr } from 'vuetify/lib/locale'
import minifyTheme from 'minify-css-string'

const themeColors = {
primary: '#1976d2',
accent: '#424242',
secondary: '#ff8f00',
info: '#26a69a',
warning: '#ffc107',
error: '#dd2c00',
success: '#00e676'
}

export default {
// theme: {},
theme: {
dark: true,
options: { customProperties: true, minifyTheme },
themes: {
dark: themeColors,
light: themeColors
}
},
lang: {
locales: { fr },
current: 'fr'
Expand Down

0 comments on commit b049b62

Please sign in to comment.