@perplexdotgg/bounce 1.0.2 → 1.0.3
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/build/bounce.js +3 -3
- package/package.json +1 -1
- package/vite.config.js +14 -0
package/build/bounce.js
CHANGED
|
@@ -3241,9 +3241,9 @@ var ConstraintType = /* @__PURE__ */ ((ConstraintType2) => {
|
|
|
3241
3241
|
})(ConstraintType || {});
|
|
3242
3242
|
const baseConstraintProps = {
|
|
3243
3243
|
// unless we use require here, this file will be imported after it is needed
|
|
3244
|
-
bodyA: /* @__PURE__ */ LazyReferenceType((() =>
|
|
3245
|
-
bodyB: /* @__PURE__ */ LazyReferenceType((() =>
|
|
3246
|
-
constraintPairNode: /* @__PURE__ */ LazyReferenceType((() =>
|
|
3244
|
+
bodyA: /* @__PURE__ */ LazyReferenceType((() => Body)),
|
|
3245
|
+
bodyB: /* @__PURE__ */ LazyReferenceType((() => Body)),
|
|
3246
|
+
constraintPairNode: /* @__PURE__ */ LazyReferenceType((() => ConstraintPairNode)),
|
|
3247
3247
|
referenceFrame: /* @__PURE__ */ NumberType(0),
|
|
3248
3248
|
isEnabled: /* @__PURE__ */ BooleanType(true)
|
|
3249
3249
|
};
|
package/package.json
CHANGED
package/vite.config.js
CHANGED
|
@@ -32,6 +32,20 @@ export default defineConfig({
|
|
|
32
32
|
// showDiagnostics: true,
|
|
33
33
|
// },
|
|
34
34
|
}),
|
|
35
|
+
{
|
|
36
|
+
name: 'remove require() calls',
|
|
37
|
+
apply: 'build',
|
|
38
|
+
generateBundle(options, bundle) {
|
|
39
|
+
for (const [fileName, chunkInfo] of Object.entries(bundle)) {
|
|
40
|
+
if (chunkInfo.type === 'chunk') {
|
|
41
|
+
let code = chunkInfo.code;
|
|
42
|
+
// Simple regex to remove require() calls
|
|
43
|
+
code = code.replace(/require\((['"`])(.*?)\1\)\.?/g, '');
|
|
44
|
+
chunkInfo.code = code;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
35
49
|
],
|
|
36
50
|
test: {
|
|
37
51
|
include: ["tests/**/*.test.ts"],
|