Skip to content

Commit

Permalink
Added source maps to esm build per #761
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed May 16, 2023
1 parent 578ff78 commit 869b720
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 79 deletions.
166 changes: 89 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"webpack": "^5.79.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
"webpack-dev-middleware": "^6.0.2"
"rollup-plugin-sourcemaps": "^0.6.3"
},
"dependencies": {
"bmp-js": "^0.1.0",
Expand All @@ -74,6 +74,9 @@
"wasm-feature-detect": "^1.2.11",
"zlibjs": "^0.3.1"
},
"overrides": {
"@rollup/pluginutils": "^5.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/naptha/tesseract.js.git"
Expand Down
4 changes: 3 additions & 1 deletion scripts/rollup.esm.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import commonjs from '@rollup/plugin-commonjs';
import sourcemaps from 'rollup-plugin-sourcemaps';

export default [
{
input: 'dist/tesseract.min.js',
output: {
file: 'dist/tesseract.esm.min.js',
format: 'esm',
sourcemap: true,
banner: '/* eslint-disable */',
},
plugins: [commonjs()],
plugins: [commonjs(), sourcemaps()],
},
];

0 comments on commit 869b720

Please sign in to comment.