Skip to content

Commit f24cc72

Browse files
committed
feat: minify the build
1 parent 072ea5d commit f24cc72

File tree

3 files changed

+161
-7
lines changed

3 files changed

+161
-7
lines changed

package-lock.json

Lines changed: 149 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-linkedin-login-oauth2",
3-
"version": "1.0.10",
3+
"version": "2.0.0-beta.0",
44
"description": "React component for Linked In Log In feature using OAuth 2.0",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -43,7 +43,8 @@
4343
"react-dom": "^17.0.2",
4444
"react-router-dom": "^4.3.1",
4545
"rimraf": "^3.0.2",
46-
"rollup-plugin-peer-deps-external": "^2.2.4"
46+
"rollup-plugin-peer-deps-external": "^2.2.4",
47+
"rollup-plugin-terser": "^7.0.2"
4748
},
4849
"author": "nvh95",
4950
"homepage": "https://github.com/nvh95/react-linkedin-login-oauth2",

rollup.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import peerDepsExternal from "rollup-plugin-peer-deps-external";
22
import babel from "@rollup/plugin-babel";
33
import resolve from "@rollup/plugin-node-resolve";
44
import commonjs from "@rollup/plugin-commonjs";
5+
import { terser } from "rollup-plugin-terser";
56
// import typescript from "rollup-plugin-typescript2";
67
// import postcss from "rollup-plugin-postcss";
78
// import copy from "rollup-plugin-copy";
@@ -14,12 +15,12 @@ export default {
1415
{
1516
file: packageJson.main,
1617
format: "cjs",
17-
sourcemap: true,
18+
// sourcemap: true,
1819
},
1920
{
2021
file: packageJson.module,
2122
format: "esm",
22-
sourcemap: true,
23+
// sourcemap: true,
2324
},
2425
],
2526
plugins: [
@@ -36,5 +37,11 @@ export default {
3637
// targets: [
3738
// ],
3839
// }),
40+
terser({
41+
output: { comments: false },
42+
compress: {
43+
drop_console: true,
44+
},
45+
}),
3946
],
4047
};

0 commit comments

Comments
 (0)