Skip to content

Commit 94360fe

Browse files
authored
fix: bundle array deps (#204)
bundle `is-any-array` and `ml-array-rescale` into `ml-matrix` build: add sourcemaps
1 parent b398a84 commit 94360fe

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
22
node_modules
33
/matrix.*js
4+
/matrix.*.map
45
coverage/

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
"files": [
1919
"matrix.d.ts",
2020
"matrix.js",
21+
"matrix.js.map",
2122
"matrix.mjs",
2223
"matrix.umd.js",
24+
"matrix.umd.js.map",
2325
"src"
2426
],
2527
"scripts": {
@@ -63,7 +65,7 @@
6365
"devDependencies": {
6466
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
6567
"@rollup/plugin-commonjs": "^28.0.6",
66-
"@rollup/plugin-node-resolve": "^16.0.1",
68+
"@rollup/plugin-node-resolve": "^16.0.3",
6769
"@rollup/plugin-terser": "^0.4.4",
6870
"@vitest/coverage-v8": "^3.2.4",
6971
"benchmark": "^2.1.4",
@@ -80,7 +82,7 @@
8082
"vitest": "^3.2.4"
8183
},
8284
"dependencies": {
83-
"is-any-array": "^2.0.1",
84-
"ml-array-rescale": "^1.3.7"
85+
"is-any-array": "^3.0.0",
86+
"ml-array-rescale": "^2.0.0"
8587
}
8688
}

rollup.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export default [
99
file: 'matrix.js',
1010
format: 'cjs',
1111
exports: 'named',
12+
sourcemap: true,
1213
},
13-
external: ['is-any-array', 'ml-array-rescale'],
14+
plugins: [resolve()],
1415
},
1516
{
1617
input: 'src/index.js',
@@ -19,6 +20,7 @@ export default [
1920
file: 'matrix.umd.js',
2021
format: 'umd',
2122
exports: 'named',
23+
sourcemap: true,
2224
},
2325
plugins: [resolve(), commonJS(), terser()],
2426
},

0 commit comments

Comments
 (0)