Issues (208)

src/config.php (19 issues)

1
<?php
2
/**
3
 * Vite plugin for Craft CMS
4
 *
5
 * Allows the use of the Vite.js next generation frontend tooling with Craft CMS
6
 *
7
 * @link      https://nystudio107.com
0 ignored issues
show
The tag in position 1 should be the @copyright tag
Loading history...
8
 * @copyright Copyright (c) 2021 nystudio107
0 ignored issues
show
@copyright tag must contain a year and the name of the copyright holder
Loading history...
9
 */
0 ignored issues
show
PHP version not specified
Loading history...
Missing @category tag in file comment
Loading history...
Missing @package tag in file comment
Loading history...
Missing @author tag in file comment
Loading history...
Missing @license tag in file comment
Loading history...
10
11
use craft\helpers\App;
12
13
/**
14
 * Vite config.php
15
 *
16
 * This file exists only as a template for the Vite settings.
17
 * It does nothing on its own.
18
 *
19
 * Don't edit this file, instead copy it to 'craft/config' as 'vite.php'
20
 * and make your changes there to override default settings.
21
 *
22
 * Once copied to 'craft/config', this file will be multi-environment aware as
23
 * well, so you can have different settings groups for each environment, just as
24
 * you do for 'general.php'
25
 */
26
27
return [
28
29
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
30
     * @var bool Should the dev server be used?
31
     */
32
    'useDevServer' => App::env('ENVIRONMENT') === 'dev' || App::env('CRAFT_ENVIRONMENT') === 'dev',
33
34
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
35
     * @var string File system path (or URL) to the Vite-built manifest.json
36
     */
37
    'manifestPath' => '@webroot/dist/manifest.json',
38
39
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
40
     * @var string The public URL to the dev server (what appears in `<script src="">` tags
41
     */
42
    'devServerPublic' => 'http://localhost:3000/',
43
44
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
45
     * @var string The public URL to use when not using the dev server
46
     */
47
    'serverPublic' => App::env('PRIMARY_SITE_URL') . '/dist/',
48
49
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
50
     * @var string|array The JavaScript entry from the manifest.json to inject on Twig error pages
51
     *              This can be a string or an array of strings
52
     */
53
    'errorEntry' => '',
54
55
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
56
     * @var string String to be appended to the cache key
57
     */
58
    'cacheKeySuffix' => '',
59
60
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
61
     * @var string The internal URL to the dev server, when accessed from the environment in which PHP is executing
62
     *              This can be the same as `$devServerPublic`, but may be different in containerized or VM setups.
63
     *              ONLY used if $checkDevServer = true
64
     */
65
    'devServerInternal' => '',
66
67
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
68
     * @var bool Should we check for the presence of the dev server by pinging $devServerInternal to make sure it's running?
69
     */
70
    'checkDevServer' => false,
71
72
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
73
     * @var bool Whether the react-refresh-shim should be included
74
     */
75
    'includeReactRefreshShim' => false,
76
77
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
78
     * @var bool Whether the modulepreload-polyfill shim should be included
79
     */
80
    'includeModulePreloadShim' => true,
81
82
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
83
     * @var string File system path (or URL) to where the Critical CSS files are stored
84
     */
85
    'criticalPath' => '@webroot/dist/criticalcss',
86
87
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
88
     * @var string the suffix added to the name of the currently rendering template for the critical css file name
89
     */
90
    'criticalSuffix' => '_critical.min.css',
91
];
92