Skip to content

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

Merged
sebcrozet merged 2 commits into
dimforge:masterfrom
PoseidonEnergy:rapier-compat-dist-folder
Aug 8, 2026
Merged

Move rapier-compat build artifacts into pkg/dist#964
sebcrozet merged 2 commits into
dimforge:masterfrom
PoseidonEnergy:rapier-compat-dist-folder

Conversation

@PoseidonEnergy

@PoseidonEnergy PoseidonEnergy commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

sebcrozet added a commit that referenced this pull request Aug 8, 2026
sebcrozet added a commit that referenced this pull request Aug 8, 2026
sebcrozet added a commit that referenced this pull request Aug 8, 2026
sebcrozet added a commit that referenced this pull request Aug 8, 2026
@sebcrozet
sebcrozet force-pushed the rapier-compat-dist-folder branch 2 times, most recently from 99542e6 to 3dd1062 Compare August 8, 2026 15:37
@sebcrozet
sebcrozet force-pushed the rapier-compat-dist-folder branch from 3dd1062 to 21fb9e6 Compare August 8, 2026 15:56
@sebcrozet
sebcrozet merged commit 4267d85 into dimforge:master Aug 8, 2026
28 checks passed
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.

2 participants