Soleilw pirms 9 mēnešiem
vecāks
revīzija
8abcdf2312
3 mainītis faili ar 22 papildinājumiem un 28 dzēšanām
  1. 1
    1
      p.sh
  2. 3
    3
      package.json
  3. 18
    24
      vite.config.ts

+ 1
- 1
p.sh Parādīt failu

@@ -1,4 +1,4 @@
npx vite build:development
npx vite build:env
msg=$1
ciskip="[CI SKIP]"


+ 3
- 3
package.json Parādīt failu

@@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"build:development": "vite build --mode development",
"build": "vite build --mode production",
"build:env": "vite build --mode development",
"preview": "vite preview"
},
"dependencies": {
@@ -41,4 +41,4 @@
},
"author": "",
"license": "ISC"
}
}

+ 18
- 24
vite.config.ts Parādīt failu

@@ -1,28 +1,22 @@
import { defineConfig, loadEnv } from 'vite'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
const TimeStamp = new Date().getTime();

export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const TimeStamp = new Date().getTime();

return {
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
},
define: {
'process.env': env
},
build: {
rollupOptions: {
output: {
filename: `[name].${TimeStamp}.js`,
chunkFilename: `[name].${TimeStamp}.js`
},
},
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
},
build: {
rollupOptions: {
output: {
filename: `[name].${TimeStamp}.js`,
chunkFilename: `[name].${TimeStamp}.js`
},
},
}
})
})

Notiek ielāde…
Atcelt
Saglabāt