Skip to content

Commit fe921e8

Browse files
authored
Merge pull request #151 from neanias/install-bun-production-dependencies
Install only production dependencies using Bun
2 parents 522c7ac + de67ba8 commit fe921e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/generators/templates/_npm_install.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY<% if options.link? %> --link<% end %> .yarn/releases/* .yarn/releases/
55
<% end -%>
66
<% if using_bun? -%>
77
RUN <% if options.cache? %>--mount=type=cache,id=bld-bun-cache,target=/root/.bun \
8-
<% end %>bun install<% if options.lock? %> --frozen-lockfile<% end %>
8+
<% end %>bun install<% if options.lock? %> --frozen-lockfile<% end %> --production
99
<% elsif sources.join.include? 'yarn' -%>
1010
RUN <% if options.cache? %>--mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \
1111
YARN_CACHE_FOLDER=/root/.yarn <% end %>yarn install<% if options.lock? %> --<% if yarn_version < '2' -%>frozen-lockfile<% else %>immutable<% end %><% end %>

test/results/bun/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ RUN bundle install && \
5252

5353
# Install node modules
5454
COPY package.json bun.lock ./
55-
RUN bun install --frozen-lockfile
55+
RUN bun install --frozen-lockfile --production
5656

5757
# Copy application code
5858
COPY . .

0 commit comments

Comments
 (0)