sliftutils 1.7.36 → 1.7.37
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/index.d.ts +5 -0
- package/package.json +1 -1
- package/storage/remoteStorage/productionEnv.d.ts +0 -0
- package/storage/remoteStorage/productionEnv.ts +2 -0
- package/storage/remoteStorage/storageServer.d.ts +1 -0
- package/storage/remoteStorage/storageServer.ts +2 -0
- package/storage/remoteStorage/storageServerCli.ts +0 -1
package/index.d.ts
CHANGED
|
@@ -3353,6 +3353,10 @@ declare module "sliftutils/storage/remoteStorage/intermediateSources" {
|
|
|
3353
3353
|
|
|
3354
3354
|
}
|
|
3355
3355
|
|
|
3356
|
+
declare module "sliftutils/storage/remoteStorage/productionEnv" {
|
|
3357
|
+
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3356
3360
|
declare module "sliftutils/storage/remoteStorage/remoteConfig" {
|
|
3357
3361
|
/// <reference types="node" />
|
|
3358
3362
|
/// <reference types="node" />
|
|
@@ -3553,6 +3557,7 @@ declare module "sliftutils/storage/remoteStorage/storageController" {
|
|
|
3553
3557
|
}
|
|
3554
3558
|
|
|
3555
3559
|
declare module "sliftutils/storage/remoteStorage/storageServer" {
|
|
3560
|
+
import "./productionEnv";
|
|
3556
3561
|
import "./accessPage";
|
|
3557
3562
|
export type HostStorageServerConfig = {
|
|
3558
3563
|
url: string;
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Packages like mobx pick which build to require at runtime, from process.env.NODE_ENV. The browser require shim runs as production, so a server that loads the development build ships a module graph the client cannot satisfy ("Accessed unexpected module ./mobx.cjs.production.min.js ... Expected imports: ./mobx.cjs.development.js"). Setting this is the only way to make both sides agree, and it MUST happen before anything imports such a package - which is why it lives in its own module, imported first (import statements run in source order, so a plain statement at the top of storageServer.ts would run too late).
|
|
2
|
+
process.env.NODE_ENV = "production";
|