@tinacms/app 0.0.0-20230206213721 → 0.0.0-20230207151722
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/index.js +16 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -375,13 +375,28 @@ var viteBuild = async ({
|
|
|
375
375
|
const alias = {
|
|
376
376
|
TINA_IMPORT: configPrebuildPath
|
|
377
377
|
};
|
|
378
|
+
const publicEnv = {};
|
|
379
|
+
Object.keys(process.env).forEach((key) => {
|
|
380
|
+
if (key.startsWith("TINA_PUBLIC_") || key.startsWith("NEXT_PUBLIC_") || key === "NODE_ENV" || key === "HEAD") {
|
|
381
|
+
try {
|
|
382
|
+
if (typeof process.env[key] === "string") {
|
|
383
|
+
publicEnv[key] = process.env[key];
|
|
384
|
+
} else {
|
|
385
|
+
publicEnv[key] = JSON.stringify(process.env[key]);
|
|
386
|
+
}
|
|
387
|
+
} catch (error) {
|
|
388
|
+
console.warn(`Could not stringify public env process.env.${key} env variable`);
|
|
389
|
+
console.warn(error);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
});
|
|
378
393
|
const config = {
|
|
379
394
|
root: appRootPath,
|
|
380
395
|
base: `/${outputFolder}/`,
|
|
381
396
|
mode: local ? "development" : "production",
|
|
382
397
|
plugins: [(0, import_vite.splitVendorChunkPlugin)(), (0, import_plugin_react.default)(), viteTina()],
|
|
383
398
|
define: {
|
|
384
|
-
"process.env": `new Object(${JSON.stringify(
|
|
399
|
+
"process.env": `new Object(${JSON.stringify(publicEnv)})`,
|
|
385
400
|
__API_URL__: `"${apiUrl}"`
|
|
386
401
|
},
|
|
387
402
|
esbuild: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20230207151722",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"@types/fs-extra": "^9.0.1",
|
|
37
37
|
"@types/react": "17.0.2",
|
|
38
38
|
"@types/react-dom": "17.0.2",
|
|
39
|
-
"@tinacms/scripts": "0.0.0-
|
|
40
|
-
"tinacms": "0.0.0-
|
|
41
|
-
"@tinacms/toolkit": "0.0.0-
|
|
42
|
-
"@tinacms/mdx": "0.0.0-
|
|
39
|
+
"@tinacms/scripts": "0.0.0-20230207151722",
|
|
40
|
+
"tinacms": "0.0.0-20230207151722",
|
|
41
|
+
"@tinacms/toolkit": "0.0.0-20230207151722",
|
|
42
|
+
"@tinacms/mdx": "0.0.0-20230207151722",
|
|
43
43
|
"jest": "^27.0.6"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|