Skip to content

custom vite config to allow for any hosts to access #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions templates/vue-template/e2b.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ WORKDIR /home/user/app

# Pre-install common dependencies to speed up runtime
RUN npm init -y
RUN npm install --legacy-peer-deps vue@3
RUN npm install --legacy-peer-deps --save-dev tailwindcss@3 autoprefixer@10 postcss@8 @vue/compiler-sfc@3 vite @vitejs/plugin-vue
RUN npm install -g typescript vue@3
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

# Set up basic Vite configuration for Vue
RUN npx tailwindcss init
COPY nuxt.config.ts /home/user/app/
COPY nuxt.config.ts /home/user/app/
COPY vite.config.ts /home/user/app/
11 changes: 11 additions & 0 deletions templates/vue-template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: true,
allowedHosts: true
}
});