Skip to content

Commit

Permalink
Update to use .cjs extension
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Oct 9, 2021
1 parent 6eae403 commit 24d6855
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": [
"@babel/plugin-transform-modules-commonjs",
["replace-import-extension", {
"extMapping": { ".mjs": ".js" }
"extMapping": { ".mjs": ".cjs" }
}]
],
"assumptions": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@petamoriken/float16",
"description": "half precision floating point for JavaScript",
"version": "3.4.8",
"main": "./lib/index.js",
"main": "./lib/index.cjs",
"module": "./src/index.mjs",
"exports": {
"require": "./lib/index.js",
"require": "./lib/index.cjs",
"import": "./src/index.mjs"
},
"types": "index.d.ts",
Expand Down Expand Up @@ -43,7 +43,7 @@
],
"scripts": {
"build": "yarn run build:lib; yarn run build:browser",
"build:lib": "babel src -d lib",
"build:lib": "babel src -d lib --out-file-extension .cjs",
"build:browser": "rollup -c",
"docs": "mkdir -p docs && cp README.md docs/index.md; yarn run docs:test",
"docs:test": "mkdir -p docs/test && cp browser/float16.js docs/test/float16.js; yarn run docs:test:assets; yarn run docs:test:dependencies",
Expand Down
2 changes: 1 addition & 1 deletion test/lib/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require("espower-loader")({
});

const assert = require("power-assert");
const float16 = require("../../lib/index.js");
const float16 = require("../../lib/index.cjs");

Object.assign(global, float16);
global.assert = assert;

0 comments on commit 24d6855

Please sign in to comment.