forked from Laboratoria/SAP010-social-network
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
41 lines (39 loc) · 1.21 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig, normalizePath } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import path from 'node:path';
// additional config to direct the vite build to src directory
// https://vitejs.dev/config/#conditional-config
// https://vitejs.dev/config/shared-options.html#root
export default defineConfig(({ command }) => {
if (command === 'build') {
return {
plugins: [
viteStaticCopy({
targets: [
{
src: normalizePath(path.join(__dirname, 'src', 'Img')),
dest: normalizePath(path.join(__dirname, 'dist')),
}
]
})
],
root: 'src',
// para hacer un deploy en github pages, configura propiedad base con el
// nombre/url de tu repo
// para fazer uma implantação github pages, defina a propriedade base
// para o nome/url do seu repositório
// https://vitejs.dev/guide/static-deploy.html#github-pages
// ejemplo base: '/social-network/',
build: {
minify: false,
rollupOptions: {
output: {
dir: './dist',
},
},
},
};
}
return {};
});