Skip to content

Commit

Permalink
Rename umd.cjs to umd.js
Browse files Browse the repository at this point in the history
Ref: https://vitejs.dev/guide/build.html#library-mode
If the package.json does not contain "type": "module", Vite will generate different file extensions for Node.js compatibility. .js will become .mjs and .cjs will become .js
  • Loading branch information
nboisteault committed Jul 6, 2023
1 parent a606ca4 commit f9d20c4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pgrouting/classes/pgroutingDockable.listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function onmapDockable($event)
$content,
99,
$bp . 'assets/pgrouting/css/pgrouting.css',
$bp . 'assets/pgrouting/js/pgrouting.umd.cjs'
$bp . 'assets/pgrouting/js/pgrouting.umd.js'
);
$event->add($dock);
}
Expand Down
1 change: 0 additions & 1 deletion pgrouting/www/js/dist/pgrouting.umd.cjs.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pgrouting/www/js/dist/pgrouting.umd.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pgrouting/www/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "pgrouting",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"build": "vite build --mode prod",
"watch": "vite build --watch --mode dev"
Expand Down

0 comments on commit f9d20c4

Please sign in to comment.