Skip to content

Commit d8ff021

Browse files
authored
Fix documentation build ESM/CommonJS conflict (#7348)
1 parent 86c6e4f commit d8ff021

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- ADDED: Add exception for audible fences (`barrier=fence` with `sensory=audible` or `sensory=audio`) that deter livestock but do not block vehicles [#6964](https://github.com/Project-OSRM/osrm-backend/issues/6964)
99
- ADDED: Use `is_sidepath:of:name` and `street:name` as fallback names for unnamed sidewalks and sidepaths in foot and bicycle profiles [#7259](https://github.com/Project-OSRM/osrm-backend/issues/7259)
1010
- Build:
11+
- FIXED: Documentation build fails with ESM/CommonJS conflict after adding "type": "module" [#7347](https://github.com/Project-OSRM/osrm-backend/issues/7347)
1112
- FIXED: Set `hwloc:shared=True` in Conan config as required by onetbb [#7342](https://github.com/Project-OSRM/osrm-backend/issues/7342)
1213
- CHANGED: Cucumber tests now can run in parallel and other improvements [#7309](https://github.com/Project-OSRM/osrm-backend/issues/7309)
1314
- FIXED: Update Node.js binding path from `lib/binding` to `lib/binding_napi_v8` to match node-pre-gyp versioning conventions [#7272](https://github.com/Project-OSRM/osrm-backend/pull/7272)

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build_api_docs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ cp docs/*.md build/docs/tmp/content
4040
# Now, run the scripts to generate the actual final product
4141
pushd build/docs/tmp
4242
NODE_ENV=production browserify src/index.js | uglifyjs -c -m > ../bundle.js
43-
babel src --out-dir lib
44-
node lib/render.js ../index.html
43+
# Output as .cjs since package.json has "type": "module"
44+
babel src --out-dir lib --out-file-extension .cjs
45+
node lib/render.cjs ../index.html
4546
popd
4647

4748
# Cleanup

0 commit comments

Comments
 (0)