-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
ssr.php
58 lines (51 loc) · 1.86 KB
/
ssr.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
<?php
return [
/*
* Enable or disable the server renderer. Enabled in production by default.
*/
'enabled' => env('APP_ENV') === 'production',
/*
* When server side rendering goes wrong, nothing will be rendered so the
* client script can render everything from scratch without errors. If
* `debug` is enabled, an exception will be thrown when the JavaScript can't
* be executed.
*/
'debug' => env('APP_DEBUG', false),
/*
* Set to true if you're using Laravel Mix, then you can pass a script
* identifier to `ssr` instead of a full path.
*/
'mix' => true,
/*
* The engine class is used to execute JavaScript. Node requires you to set
* up some extra configuration below. If you want to use the V8 engine, make
* sure the v8js php extension is available.
*/
'engine' => env('SSR_ENGINE', \Spatie\Ssr\Engines\Node::class),
/*
* Extra setup for the Node engine.
*/
'node' => [
'node_path' => env('NODE_PATH', '/usr/local/bin/node'),
'temp_path' => env('SSR_TEMP_PATH', storage_path('app/ssr')),
],
/*
* Context is used to pass data to the server script. Fill this array with
* data you *always* want to send to the server script. Context can contain
* anything that's json serializable.
*/
'context' => [],
/*
* Env is used to fill `process.env` when the server script is executed.
* Fill this array with data you *always* want to send to the server script.
* The env array is only allowed to be a single level deep, and can only
* contain primitive values like numbers, strings or booleans.
*
* By default, env is prefilled with some necessary values for server side
* rendering Vue applications.
*/
'env' => [
'NODE_ENV' => 'production',
'VUE_ENV' => 'server',
],
];