-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
44 lines (42 loc) · 959 Bytes
/
vite.config.js
File metadata and controls
44 lines (42 loc) · 959 Bytes
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
42
43
44
import path from 'path';
import framework7 from 'rollup-plugin-framework7';
const SRC_DIR = path.resolve(__dirname, './src');
const PUBLIC_DIR = path.resolve(__dirname, './public');
const BUILD_DIR = path.resolve(__dirname, './www');
export default async () => {
return {
plugins: [
framework7({ emitCss: false }),
],
root: SRC_DIR,
base: '',
publicDir: PUBLIC_DIR,
build: {
outDir: BUILD_DIR,
assetsInlineLimit: 0,
emptyOutDir: true,
rollupOptions: {
treeshake: false,
},
},
resolve: {
alias: {
'@': SRC_DIR,
},
},
server: {
host: true,
proxy: {
'/api/zara': {
target: 'https://app.retailed.io/api/v1/scraper',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/zara/, '/zara')
}
}
},
esbuild: {
jsxFactory: '$jsx',
jsxFragment: '"Fragment"',
},
};
}