eddev 0.2.51 → 0.2.53
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.
|
@@ -176,23 +176,21 @@ function createNextApp(opts) {
|
|
|
176
176
|
// Sync favicon
|
|
177
177
|
_b.sent();
|
|
178
178
|
// Write APIs proxy code
|
|
179
|
-
return [4 /*yield*/, writeAPIProxies((0, path_1.join)(opts.baseDirectory, "apis"), (0, path_1.join)(serverlessDirectory, "pages/api"))
|
|
180
|
-
// Remove pages/api/trpc directory if no _rpc is found
|
|
181
|
-
];
|
|
179
|
+
return [4 /*yield*/, writeAPIProxies((0, path_1.join)(opts.baseDirectory, "apis"), (0, path_1.join)(serverlessDirectory, "pages/api"))];
|
|
182
180
|
case 18:
|
|
183
181
|
// Write APIs proxy code
|
|
184
182
|
_b.sent();
|
|
183
|
+
_b.label = 19;
|
|
184
|
+
case 19:
|
|
185
185
|
// Remove pages/api/trpc directory if no _rpc is found
|
|
186
186
|
if (!(0, fs_1.existsSync)((0, path_1.join)(opts.baseDirectory, "apis/_rpc/index.ts")) &&
|
|
187
187
|
!(0, fs_1.existsSync)((0, path_1.join)(opts.baseDirectory, "apis/_rpc.ts"))) {
|
|
188
188
|
(0, fs_extra_1.removeSync)((0, path_1.join)(serverlessDirectory, "pages/api/trpc"));
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// Update packages
|
|
195
|
-
];
|
|
190
|
+
// Create manifests
|
|
191
|
+
return [4 /*yield*/, initManifests(serverlessDirectory, opts.dev)
|
|
192
|
+
// Update packages
|
|
193
|
+
];
|
|
196
194
|
case 20:
|
|
197
195
|
// Create manifests
|
|
198
196
|
_b.sent();
|
package/package.json
CHANGED
|
@@ -7,7 +7,6 @@ import settings from "_utils/ed-config"
|
|
|
7
7
|
|
|
8
8
|
export default class Document extends NextDocument {
|
|
9
9
|
render() {
|
|
10
|
-
console.log("GTM", settings.tracking?.tagManagerID)
|
|
11
10
|
return (
|
|
12
11
|
<Html lang="en">
|
|
13
12
|
<Head>
|
|
@@ -19,7 +18,9 @@ export default class Document extends NextDocument {
|
|
|
19
18
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
20
19
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
21
20
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
22
|
-
})(window,document,'script','dataLayer',${JSON.stringify(
|
|
21
|
+
})(window,document,'script','dataLayer',${JSON.stringify(
|
|
22
|
+
settings.tracking.tagManagerID === "env" ? process.env.NEXT_PUBLIC_GTM_ID : settings.tracking?.tagManagerID
|
|
23
|
+
)});`,
|
|
23
24
|
}}
|
|
24
25
|
></script>
|
|
25
26
|
) : null}
|