Skip to content

Commit 46990fc

Browse files
author
benchify
committed
custom vite config to allow for any hosts to access
1 parent 59d4612 commit 46990fc

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

templates/vue-template/e2b.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ WORKDIR /home/user/app
66

77
# Pre-install common dependencies to speed up runtime
88
RUN npm init -y
9-
RUN npm install --legacy-peer-deps vue@3
10-
RUN npm install --legacy-peer-deps --save-dev tailwindcss@3 autoprefixer@10 postcss@8 @vue/compiler-sfc@3 vite @vitejs/plugin-vue
9+
RUN npm install -g typescript vue@3
10+
RUN npm install --legacy-peer-deps --save-dev tailwindcss@3 autoprefixer@10 postcss@8 @vue/compiler-sfc@3 vite @vitejs/plugin-vue @vitejs/plugin-react-swc
1111

1212
# Set up basic Vite configuration for Vue
1313
RUN npx tailwindcss init
14-
COPY nuxt.config.ts /home/user/app/
14+
COPY nuxt.config.ts /home/user/app/
15+
COPY vite.config.ts /home/user/app/

templates/vue-template/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react-swc'
3+
4+
// https://vite.dev/config/
5+
export default defineConfig({
6+
plugins: [react()],
7+
server: {
8+
host: true,
9+
allowedHosts: true
10+
}
11+
});

0 commit comments

Comments
 (0)