-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathvite.php
114 lines (107 loc) · 4.45 KB
/
vite.php
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
return [
/*
|--------------------------------------------------------------------------
| Configurations
|--------------------------------------------------------------------------
| The following describes a set of configurations that can be used
| independently. Because Vite does not support generating multiple
| bundles, using separate configuration files is necessary.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#configs
*/
'configs' => [
'default' => [
'entrypoints' => [
'ssr' => 'resources/scripts/ssr.ts',
'paths' => [
'resources/scripts/main.ts',
'resources/js/app.js',
],
'ignore' => '/\\.(d\\.ts|json)$/',
],
'dev_server' => [
'enabled' => true,
'url' => env('DEV_SERVER_URL', 'http://localhost:5173'),
'ping_before_using_manifest' => true,
'ping_url' => null,
'ping_timeout' => 1,
'key' => env('DEV_SERVER_KEY'),
'cert' => env('DEV_SERVER_CERT'),
],
'build_path' => 'build',
],
],
/*
|--------------------------------------------------------------------------
| Aliases
|--------------------------------------------------------------------------
| You can define aliases to avoid having to make relative imports.
| Aliases will be written to tsconfig.json automatically so your IDE
| can know how to resolve them.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#aliases
*/
'aliases' => [
'@' => 'resources',
],
/*
|--------------------------------------------------------------------------
| Commands
|--------------------------------------------------------------------------
| Before starting the development server or building the assets, you
| may need to run specific commands. With these options, you can
| define what to run, automatically.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#commands
*/
'commands' => [
'artisan' => [
'vite:tsconfig',
// 'typescript:generate'
],
'shell' => [
//
],
],
/*
|--------------------------------------------------------------------------
| Testing
|--------------------------------------------------------------------------
| Depending on the way you are testing your application,
| you may or may not need to use the manifest. This option controls
| the manifest should be used in the "testing" environment.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#testing
*/
'testing' => [
'use_manifest' => false,
],
/*
|--------------------------------------------------------------------------
| Environment variable prefixes
|--------------------------------------------------------------------------
| This option defines the prefixes that environment variables must
| have in order to be accessible from the front-end.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#env_prefixes
*/
'env_prefixes' => ['VITE_', 'MIX_', 'SCRIPT_'],
/*
|--------------------------------------------------------------------------
| Default interfaces
|--------------------------------------------------------------------------
| Here you may change how some parts of the package work by replacing
| their associated logic.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#interfaces
*/
'interfaces' => [
'heartbeat_checker' => Innocenzi\Vite\HeartbeatCheckers\HttpHeartbeatChecker::class,
'tag_generator' => Innocenzi\Vite\TagGenerators\CallbackTagGenerator::class,
'entrypoints_finder' => Innocenzi\Vite\EntrypointsFinder\DefaultEntrypointsFinder::class,
],
/*
|--------------------------------------------------------------------------
| Default configuration
|--------------------------------------------------------------------------
| Here you may specify which of the configurations above you wish
| to use as your default one.
| https://laravel-vite.innocenzi.dev/configuration/laravel-package.html#default
*/
'default' => env('VITE_DEFAULT_CONFIG', 'default'),
];