This configuration works but patch-package doesn't take (yt)

This commit is contained in:
James Cole 2024-04-07 10:12:23 +02:00
parent a384b4202a
commit b7fb5a3854
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
17 changed files with 28 additions and 75 deletions

View File

@ -4,7 +4,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"postinstall": "patch-package"
"postinstall": "patch-package --error-on-fail"
},
"devDependencies": {
"axios": "^1.6.8",

View File

@ -1,6 +1,6 @@
/*
* vite.config.js
* Copyright (c) 2023 james@firefly-iii.org
* Copyright (c) 2024 james@firefly-iii.org.
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
@ -15,7 +15,7 @@
* 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/>.
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import {defineConfig} from 'vite';
@ -43,26 +43,26 @@ export default defineConfig({
laravel({
input: [
// css
'resources/assets/v2/sass/app.scss',
'src/sass/app.scss',
// dashboard
'resources/assets/v2/pages/dashboard/dashboard.js',
'src/pages/dashboard/dashboard.js',
// accounts
'resources/assets/v2/pages/accounts/index.js',
'src/pages/accounts/index.js',
// administrations
'resources/assets/v2/pages/administrations/index.js',
'resources/assets/v2/pages/administrations/create.js',
'resources/assets/v2/pages/administrations/edit.js',
'src/pages/administrations/index.js',
'src/pages/administrations/create.js',
'src/pages/administrations/edit.js',
// transactions
'resources/assets/v2/pages/transactions/create.js',
'resources/assets/v2/pages/transactions/edit.js',
'resources/assets/v2/pages/transactions/show.js',
'resources/assets/v2/pages/transactions/index.js',
'src/pages/transactions/create.js',
'src/pages/transactions/edit.js',
'src/pages/transactions/show.js',
'src/pages/transactions/index.js',
],
publicDirectory: '../../../public',
refresh: true,
}),
//manifestSRI(),

View File

@ -1,47 +0,0 @@
/*
* webpack.mix.js
* Copyright (c) 2020 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/>.
*/
let mix = require('laravel-mix');
mix.webpackConfig({
resolve: {
alias: {
'vue$': 'vue/dist/vue.runtime.common.js'
},
fallback: {
"stream": require.resolve("stream-browserify"),
"zlib": false,
"https": false,
"http": false
}
}
});
mix.js('resources/assets/js/app.js', 'public/v1/js');
mix.js('resources/assets/js/app_vue.js', 'public/v1/js').vue({version: 2});
mix.js('resources/assets/js/create_transaction.js', 'public/v1/js').vue({version: 2});
mix.js('resources/assets/js/edit_transaction.js', 'public/v1/js').vue({version: 2});
mix.js('resources/assets/js/profile.js', 'public/v1/js').vue({version: 2});
// webhooks
mix.js('resources/assets/js/webhooks/index.js', 'public/v1/js/webhooks').vue({version: 2});
mix.js('resources/assets/js/webhooks/create.js', 'public/v1/js/webhooks').vue({version: 2});
mix.js('resources/assets/js/webhooks/edit.js', 'public/v1/js/webhooks').vue({version: 2});
mix.js('resources/assets/js/webhooks/show.js', 'public/v1/js/webhooks').vue({version: 2});

View File

@ -76,5 +76,5 @@
@endsection
@section('scripts')
@vite(['resources/assets/v2/pages/dashboard/dashboard.js'])
@vite(['src/pages/dashboard/dashboard.js'])
@endsection

View File

@ -62,7 +62,7 @@
})()
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@vite(['resources/assets/v2/sass/app.scss'])
@vite(['sass/app.scss'])
</head>
<body class="container bg-body-secondary">

View File

@ -62,7 +62,7 @@
})()
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@vite(['resources/assets/v2/sass/app.scss'])
@vite(['sass/app.scss'])
</head>
<body class="container bg-body-secondary">

View File

@ -62,7 +62,7 @@
})()
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@vite(['resources/assets/v2/sass/app.scss'])
@vite(['sass/app.scss'])
</head>
<body class="login-page bg-body-secondary">

View File

@ -174,5 +174,5 @@
@endsection
@section('scripts')
@vite(['resources/assets/v2/pages/accounts/index.js'])
@vite(['src/pages/accounts/index.js'])
@endsection

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/administrations/create.js'])
@vite(['src/pages/administrations/create.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/administrations/edit.js'])
@vite(['src/pages/administrations/edit.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/administrations/index.js'])
@vite(['src/pages/administrations/index.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -54,5 +54,5 @@
@endsection
@section('scripts')
@vite(['resources/assets/v2/pages/dashboard/dashboard.js'])
@vite(['src/pages/dashboard/dashboard.js'])
@endsection

View File

@ -68,7 +68,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@yield('styles')
@vite(['resources/assets/v2/sass/app.scss'])
@vite(['src/sass/app.scss'])
</head>

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/transactions/create.js'])
@vite(['src/pages/transactions/create.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/transactions/edit.js'])
@vite(['src/pages/transactions/edit.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/transactions/index.js'])
@vite(['src/pages/transactions/index.js'])
@endsection
@section('content')
<div class="app-content">

View File

@ -1,6 +1,6 @@
@extends('layout.v2')
@section('scripts')
@vite(['resources/assets/v2/pages/transactions/show.js'])
@vite(['src/pages/transactions/show.js'])
@endsection
@section('content')
<div class="app-content">