@clary-so/measure 0.4.8 → 0.4.9
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/bin-bundled.js +1 -0
- package/esbuild-bin.mjs +7 -0
- package/package.json +1 -1
package/dist/bin-bundled.js
CHANGED
package/esbuild-bin.mjs
CHANGED
|
@@ -29,6 +29,13 @@ const result = await esbuild.build({
|
|
|
29
29
|
// Force all react requires to resolve from this package's node_modules
|
|
30
30
|
react: join(__dirname, "node_modules/react"),
|
|
31
31
|
},
|
|
32
|
+
// The original code in dist/server/bin.js uses __dirname (= dist/server/)
|
|
33
|
+
// and does path.join(__dirname, "../../dist") to find the webapp.
|
|
34
|
+
// In the bundle at dist/bin-bundled.js, __dirname = dist/, so we override
|
|
35
|
+
// it to dist/server/ so the existing path logic still works.
|
|
36
|
+
banner: {
|
|
37
|
+
js: `var __bundled_dirname = __dirname; __dirname = require("path").join(__dirname, "server");`,
|
|
38
|
+
},
|
|
32
39
|
define: {
|
|
33
40
|
"process.env.NODE_ENV": '"production"',
|
|
34
41
|
},
|