smart detection for uv.client.js
People may forget to update uv.config.js or cache may need to update
This commit is contained in:
parent
e502dc33ea
commit
26d17cd241
1 changed files with 6 additions and 1 deletions
|
|
@ -52,7 +52,12 @@ class Ultraviolet {
|
|||
this.meta.origin ||= '';
|
||||
this.bundleScript = options.bundle || '/uv.bundle.js';
|
||||
this.handlerScript = options.handler || '/uv.handler.js';
|
||||
this.clientScript = options.client || '/uv.client.js';
|
||||
this.clientScript =
|
||||
options.client ||
|
||||
(options.bundle &&
|
||||
options.bundle.includes('uv.bundle.js') &&
|
||||
options.bundle.replace('uv.bundle.js', 'uv.client.js')) ||
|
||||
'/uv.client.js';
|
||||
this.configScript = options.config || '/uv.config.js';
|
||||
this.meta.url ||= this.meta.base || '';
|
||||
this.codec = Ultraviolet.codec;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue