-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
executable file
·54 lines (50 loc) · 1.63 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
42
43
44
45
46
47
48
49
50
51
52
53
54
//vite.config.js (or) vite.config.ts
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import VitePluginPg from './vite-plugin-pg.js'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
VitePluginPg({
dirs: {
src: './src',
pages: './pages',
},
output: {
// outDir: 'tailwind_theme', // default is 'dist'
cssDir: './', // could be './css', relative to outDir (default is 'dist')
cssFilename: 'tailwind.css',
cssWpFilename: 'tailwind_for_wp_editor.css',
jsDir: './js', // Relative to outDir (default is 'dist')
imgDir: './images', // Relative to outDir (default is 'dist')
},
// lib: process.env.LIB, // passed via package.json script commands
// wp: process.env.WP, // passed via package.json script commands
pagesWithEntries: [
{
page: './index.html',
entry: './src/main.js',
},
{
page: './blog.html',
entry: './src/main.js',
},
],
}),
],
build: {
minify: false,
cssMinify: false,
},
resolve: {
alias: {
/* Must be either an object, or an array of { find, replacement, customResolver } pairs. */
/* Refer to: https://vitejs.dev/config/shared-options.html#resolve-alias */
/* Please ensure that you update the filenames and paths to accurately match those used in your project. */
'@': fileURLToPath(new URL('./src', import.meta.url)),
'~': fileURLToPath(new URL('./src', import.meta.url)),
'~~': fileURLToPath(new URL('./', import.meta.url)),
},
},
//...
})