Skip to content

Commit

Permalink
fix(project): remove sourcemap as a paliative
Browse files Browse the repository at this point in the history
  • Loading branch information
olavoparno committed Feb 17, 2022
1 parent b726f3c commit 75da78b
Show file tree
Hide file tree
Showing 6 changed files with 9,664 additions and 41 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

| Statements | Branches | Functions | Lines |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg) |
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) |

## Table of Contents

Expand Down
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"files": [
"LICENSE",
"README.md",
"dist/"
"dist"
],
"lint-staged": {
"*.{js,ts,tsx}": [
Expand Down Expand Up @@ -51,40 +51,39 @@
"react": "^17.0.2"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/runtime": "^7.14.6",
"@babel/core": "^7.17.4",
"@babel/runtime": "^7.17.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-typescript": "^8.2.1",
"@rollup/plugin-url": "^6.0.0",
"@testing-library/react-hooks": "^7.0.1",
"@types/jest": "^26.0.24",
"@types/react": "^17.0.14",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/parser": "^4.28.3",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@testing-library/react-hooks": "^7.0.2",
"@types/jest": "^27.4.0",
"@types/react": "^17.0.39",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"cross-env": "^7.0.3",
"eslint": "^7.30.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-config-airbnb-typescript-prettier": "^4.2.0",
"eslint": "^8.9.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript-prettier": "^5.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^7.0.1",
"istanbul-badges-readme": "^1.4.0",
"prettier": "^2.3.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"gh-pages": "^3.2.3",
"husky": "^7.0.4",
"istanbul-badges-readme": "^1.8.1",
"prettier": "^2.5.1",
"react": "^17.0.2",
"react-scripts": "^4.0.3",
"react-scripts": "^5.0.0",
"react-test-renderer": "^17.0.2",
"rollup": "^2.53.1",
"rollup": "^2.67.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.3.0",
"standard-version": "^9.3.0",
"typescript": "^4.3.5"
"standard-version": "^9.3.2",
"tslib": "^2.3.1",
"typescript": "^4.5.5"
}
}
10 changes: 4 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import external from 'rollup-plugin-peer-deps-external';
import url from '@rollup/plugin-url';
import { terser } from 'rollup-plugin-terser';

import pkg from './package.json';
Expand All @@ -14,21 +13,20 @@ export default {
file: pkg.main,
format: 'cjs',
exports: 'named',
sourcemap: true,
sourcemap: false,
},
{
file: pkg.module,
format: 'es',
format: 'esm',
exports: 'named',
sourcemap: true,
sourcemap: false,
},
],
plugins: [
external(),
url({ exclude: ['**/*.svg'] }),
resolve(),
typescript(),
commonjs({ extensions: ['.js', '.ts'] }),
typescript(),
terser(),
],
};
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function useHotjar(): IUseHotjar {

return true;
} catch (error) {
console.error(`Hotjar error: ${error.message}`);
console.error(`Hotjar error: ${(error as Error).message}`);

return false;
}
Expand All @@ -53,7 +53,7 @@ export default function useHotjar(): IUseHotjar {

return true;
} catch (error) {
console.error(`Hotjar error: ${error.message}`);
console.error(`Hotjar error: ${(error as Error).message}`);

return false;
}
Expand All @@ -71,7 +71,7 @@ export default function useHotjar(): IUseHotjar {

return true;
} catch (error) {
console.error(`Hotjar error: ${error.message}`);
console.error(`Hotjar error: ${(error as Error).message}`);

return false;
}
Expand All @@ -89,7 +89,7 @@ export default function useHotjar(): IUseHotjar {

return true;
} catch (error) {
console.error(`Hotjar error: ${error.message}`);
console.error(`Hotjar error: ${(error as Error).message}`);

return false;
}
Expand Down
8 changes: 6 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"es2016",
"es2017"
],
"sourceMap": true,
"rootDir": "src",
"baseUrl": "src",
"declaration": true,
"declarationDir": "dist",
"allowJs": false,
"jsx": "react-jsx",
"moduleResolution": "node",
Expand Down Expand Up @@ -38,6 +41,7 @@
"dist",
"example",
"rollup.config.js",
"src/__tests__"
"**/tests",
"**/*.test.ts*"
]
}
Loading

0 comments on commit 75da78b

Please sign in to comment.