Skip to content

Move rapier-compat build artifacts into pkg/dist#964

Open
PoseidonEnergy wants to merge 1 commit into
dimforge:masterfrom
PoseidonEnergy:rapier-compat-dist-folder
Open

Move rapier-compat build artifacts into pkg/dist#964
PoseidonEnergy wants to merge 1 commit into
dimforge:masterfrom
PoseidonEnergy:rapier-compat-dist-folder

Conversation

@PoseidonEnergy

@PoseidonEnergy PoseidonEnergy commented Jul 14, 2026

Copy link
Copy Markdown

This PR moves generated rapier-compat artifacts into a dedicated pkg/dist directory instead of placing them alongside package.json.

Having rapier.mjs in the same folder as package.json was causing problems in WebStorm when Rapier is used as an NPM workspace. It was interfering with WebStorm's type analysis.


It updates:

  • Rollup bundle output paths
  • TypeScript declaration output paths
  • WASM and generated binding destinations
  • Generated source imports
  • package.json entry points and exports
  • raw.d.ts generation

The change applies to all 2D, 3D, deterministic, and SIMD variants.

Package-level imports remain unchanged:

import RAPIER from "@dimforge/rapier3d-compat";

Before

pkg/
├── package.json
├── rapier.mjs
├── rapier.mjs.map
├── rapier.cjs
├── rapier.cjs.map
├── rapier.d.ts
├── raw.d.ts
├── rapier_wasm3d.js
├── rapier_wasm3d.d.ts
├── rapier_wasm3d_bg.wasm
└── rapier_wasm3d_bg.wasm.d.ts

After

pkg/
├── package.json
└── dist/
    ├── rapier.mjs
    ├── rapier.mjs.map
    ├── rapier.cjs
    ├── rapier.cjs.map
    ├── rapier.d.ts
    ├── raw.d.ts
    ├── rapier_wasm3d.js
    ├── rapier_wasm3d.d.ts
    ├── rapier_wasm3d_bg.wasm
    └── rapier_wasm3d_bg.wasm.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant