Skip to content

Commit ea76605

Browse files
committed
dev defn works with /nuxt/
1 parent 9ab9b37 commit ea76605

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"name": "nuxt3-win32-posix-path",
33
"version": "v0.1.0",
44
"author": "hychan48",
5+
"type": "module",
56
"description": "nuxt3-win32-posix-path",
67
"keywords": ["path", "win32", "posix", "wsl","wsl2","cygwin","nt","vite-build-binaries"],
78
"license": "MIT",
89
"private": true,
910
"scripts": {
10-
"dev:vite": "vite dev vite-src",
11+
"dev:vite": "vite dev vite-src --base /nuxt3-win32-posix-path/",
1112
"build:vite": "vite build vite-src",
1213
"build": "nuxt build",
1314
"dev": "nuxt dev",

vite-src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + Vue</title>
7+
<title>nuxt3-win32-posix-path | CodeForWings</title>
88
</head>
99
<body>
1010
<div id="app"></div>

vite-src/vite.config.js renamed to vite-src/vite.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1+
// process.env.BASE_URL = '/nuxt3-win32-posix-path/';
12
import { defineConfig } from 'vite'
23
import vue from '@vitejs/plugin-vue'
34
import {fileURLToPath, URL} from "node:url";
45

6+
//might need dotenv for the it to work ... todo
57
/**
68
* with vite dev vite-src
79
* uses this vite.config.js by default
810
* but which package.json?
11+
* im assuming if this file doesnt exist. it looks at the first cwd one
912
*/
1013
console.log('vite-src/vite.config.js');
14+
// console.log('vite-src/vite.config.js: ',import.meta.env.BASE_URL);//difference? crashed even as mjs
15+
console.log('vite-src/vite.config.js: ',process.env.BASE_URL);//difference?
16+
console.log('vite-src/vite.config.js: ',process.env.VITE_SOME_KEY);//difference?
17+
// console.log('vite-src/vite.config.js: ',import.meta.env.MODE);//difference?
18+
// console.log('vite-src/vite.config.js: ',import.meta.env.VITE_SOME_KEY);//difference?
1119
// https://vitejs.dev/config/
1220
export default defineConfig({
1321
plugins: [vue()],
22+
server:{
23+
fs:{
24+
allow: ['..']
25+
},
26+
},
27+
base:"/nuxt3-win32-posix-path/",
1428
resolve: {
1529
//im assuming root package.json?
1630
alias: {

0 commit comments

Comments
 (0)