@designtools/shadows 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -428,10 +428,11 @@ async function createToolServer(config) {
|
|
|
428
428
|
if (config.setupRoutes) {
|
|
429
429
|
config.setupRoutes(app, projectRoot);
|
|
430
430
|
}
|
|
431
|
-
const
|
|
431
|
+
const distRoot = config.clientDistRoot ? path4.resolve(config.clientDistRoot) : null;
|
|
432
|
+
const builtIndex = distRoot ? path4.join(distRoot, "index.html") : null;
|
|
432
433
|
const hasBuiltClient = builtIndex && fs4.existsSync(builtIndex);
|
|
433
434
|
if (hasBuiltClient) {
|
|
434
|
-
app.use(express.static(
|
|
435
|
+
app.use(express.static(distRoot));
|
|
435
436
|
app.use((_req, res) => {
|
|
436
437
|
res.sendFile(builtIndex);
|
|
437
438
|
});
|