File tree Expand file tree Collapse file tree 2 files changed +29
-10
lines changed Expand file tree Collapse file tree 2 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 1
- node-linker = hoisted # Helps with dependency deduplication across all Node.js apps
2
- public-hoist-pattern[] = *rollup* # Benefits both Nuxt and NestJS builds
3
- public-hoist-pattern[] = *esbuild* # Used by both Nuxt and NestJS
4
- public-hoist-pattern[] = *webpack* # NestJS uses webpack by default
5
- legacy-peer-deps = true # Helps resolve peer dependency issues across all Node.js apps
6
- shamefully-hoist = true # Ensures build dependencies are available across workspace
7
- prefer-dedupe = true # Reduces node_modules size for all apps
1
+ node-linker = hoisted
2
+ shamefully-hoist = true
3
+ strict-peer-dependencies = false
4
+ legacy-peer-deps = true
5
+ resolution-mode = highest
6
+ build-from-source = true
7
+ platform = linux
8
+ arch = x64
9
+ public-hoist-pattern[] = *rollup*
10
+ public-hoist-pattern[] = *esbuild*
11
+ public-hoist-pattern[] = *webpack*
12
+ public-hoist-pattern[] = *types*
13
+ public-hoist-pattern[] = *vue*
14
+ public-hoist-pattern[] = *nuxt*
15
+ public-hoist-pattern[] = *vite*
16
+ public-hoist-pattern[] = @rollup/*
Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ ARG NUXT_PUBLIC_SUPABASE_URL
8
8
ENV NX_CLOUD_ACCESS_TOKEN=${NX_CLOUD_ACCESS_TOKEN} \
9
9
NODE_ENV=production \
10
10
NUXT_PUBLIC_SUPABASE_URL=${NUXT_PUBLIC_SUPABASE_URL} \
11
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
11
12
ROLLUP_SKIP_NODE_RESOLVE=true \
12
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
13
+ ROLLUP_NATIVE=false \
14
+ npm_config_build_from_source=true
13
15
14
16
# Install required build dependencies
15
17
RUN apt-get update && \
@@ -22,15 +24,23 @@ COPY nx.json ./
22
24
COPY tsconfig*.json ./
23
25
COPY .npmrc ./
24
26
27
+ # Pre-install specific platform dependencies
28
+ RUN npm install -g @rollup/rollup-linux-x64-gnu @rollup/rollup-linux-x64-musl --no-save
29
+
30
+ # Install root dependencies with platform specifics
31
+ RUN npm install --no-progress --platform=linux --arch=x64
32
+
25
33
# Copy only needed source files
26
34
COPY apps/app ./apps/app
27
35
COPY libs ./libs
28
36
COPY layers ./layers
29
37
30
- # Install dependencies with platform specifics
31
- RUN npm install --no-progress
38
+ # Install workspace dependencies
32
39
RUN npm install --workspaces
33
40
41
+ # Now copy source files
42
+ COPY . .
43
+
34
44
# Install nx and build
35
45
RUN npm install nx@latest -g
36
46
RUN nx reset
You can’t perform that action at this time.
0 commit comments