-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsnowpack.config.js
38 lines (38 loc) · 1.19 KB
/
snowpack.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
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
//! Mount Laravel Resources
"resources/js": { url: '/js' },
},
plugins: [
'@snowpack/plugin-vue',
'@snowpack/plugin-dotenv',
//? use a prefix in .env: SNOWPACK_PUBLIC_
//? use in any js as: `import.meta.env.SNOWPACK_PUBLIC_{NAME}`
[
'@snowpack/plugin-run-script',
{
cmd: 'NODE_ENV=production npx tailwindcss-cli@latest build ./resources/css/app.css -o ./public/css/app.css', // production build command
watch: 'TAILWIND_MODE=watch NODE_ENV=development postcss ./resources/css/app.css -o ./public/css/app.css -w', // (optional) dev server command
},
],
],
alias: {
'@': './resources/js',
},
devOptions: {
hmr: true,
hmrDelay: 50,
},
buildOptions: {
out: 'public',
clean: false, //! DONT set to true, it will delete all files in public folder
metaUrlPath: '_snowpack',
},
optimize: {
minify: true,
entrypoints: ['./resources/js/app.js'],
splitting: true,
treeshake: true,
},
};