firefly-iii/vite.config.js

53 lines
1.7 KiB
JavaScript
Raw Normal View History

2023-09-19 23:36:43 -05:00
/*
* vite.config.js
* Copyright (c) 2023 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2023-07-11 07:42:57 -05:00
import {defineConfig} from 'vite';
2023-07-11 04:45:55 -05:00
import laravel from 'laravel-vite-plugin';
2023-08-12 11:12:20 -05:00
import manifestSRI from 'vite-plugin-manifest-sri';
2023-07-11 04:45:55 -05:00
2023-08-06 00:02:55 -05:00
const host = '127.0.0.1';
2023-07-11 04:45:55 -05:00
export default defineConfig({
plugins: [
laravel({
input: [
2023-07-23 01:26:12 -05:00
'resources/assets/v2/sass/app.scss',
2023-08-22 01:28:52 -05:00
'resources/assets/v2/pages/dashboard/dashboard.js',
2023-10-08 09:21:09 -05:00
'resources/assets/v2/pages/transactions/create.js',
],
2023-07-11 04:45:55 -05:00
refresh: true,
}),
2023-08-12 11:12:20 -05:00
manifestSRI(),
2023-07-11 04:45:55 -05:00
],
server: {
usePolling: true,
allowedHosts: '*.sd.local',
host: '0.0.0.0',
2023-07-11 07:42:57 -05:00
hmr: {host},
2023-08-06 00:02:55 -05:00
cors: true
// https: {
// key: fs.readFileSync(`/Users/sander/Sites/vm/tls-certificates/wildcard.sd.local.key`),
// cert: fs.readFileSync(`/Users/sander/Sites/vm/tls-certificates/wildcard.sd.local.crt`),
// },
2023-07-11 04:45:55 -05:00
},
});