forked from qld-gov-au/qgds-vanilla
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
32 lines (31 loc) · 843 Bytes
/
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
import { viteHandlebarsEmbedSvgPlugin } from "./.esbuild/plugins/handlebarsEmbedSvgPlugin.js";
/** @type {import('vite').UserConfig} */
export default {
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
sass: {
silenceDeprecations: ["imports"],
},
},
},
plugins: [
{
name: "html-transform",
transform(src, id) {
if (id.endsWith(".mustache") || id.endsWith(".html") || id.endsWith(".hbs")) {
// Transform your HTML files here (src is the file content as a string)
return src;
}
},
},
viteHandlebarsEmbedSvgPlugin(),
],
assetsInclude: ["**/*.hbs", "**/*.hbs?raw"],
test: {
passWithNoTests: true, // Do not fail when no tests are found
reporters: ["verbose"], // Use the verbose reporter
},
};