From e67ac81dfaf057dc265b432331e4a28f79eadae8 Mon Sep 17 00:00:00 2001 From: Rishav Thakur Date: Tue, 25 May 2021 03:11:43 +0530 Subject: [PATCH 1/2] feat(build)(unstable): used babel to generate ind files js only --- .babelrc | 8 ++++++++ package.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..f5b8f32 --- /dev/null +++ b/.babelrc @@ -0,0 +1,8 @@ +{ + "exclude": "node_modules/**", + "presets": ["@babel/preset-typescript", "@babel/preset-react"], + "plugins": [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-private-methods" + ] +} diff --git a/package.json b/package.json index 6ddac65..6e10574 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "prebuild": "rimraf dist", "build": "concurrently yarn:build:*", - "build:lib": "rollup -c", + "build:lib": "babel src/ --extensions \".ts,.tsx,.jsx\" -d dist", "build:types": "tsc --emitDeclarationOnly", "lint": "concurrently yarn:lint:*", "lint:src": "eslint src", @@ -72,6 +72,7 @@ "typescript": "^4.2.4" }, "dependencies": { + "@babel/cli": "^7.14.3", "lodash.debounce": "^4.0.8", "react-router-dom": "^5.2.0", "react-waypoint": "^10.1.0" From 7d34c76af1fdd0dfe7f4383d65be110967f8e246 Mon Sep 17 00:00:00 2001 From: Rishav Thakur Date: Wed, 26 May 2021 10:43:57 +0530 Subject: [PATCH 2/2] fix(css): build folder now has css --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 6e10574..ddc6a9d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "prebuild": "rimraf dist", "build": "concurrently yarn:build:*", "build:lib": "babel src/ --extensions \".ts,.tsx,.jsx\" -d dist", + "build:css": "copyfiles -u 1 src/**/*.css dist/", "build:types": "tsc --emitDeclarationOnly", "lint": "concurrently yarn:lint:*", "lint:src": "eslint src", @@ -53,6 +54,7 @@ "babel-loader": "^8.2.2", "classnames": "^2.2.6", "concurrently": "^6.0.2", + "copyfiles": "^2.4.1", "eslint": "^7.24.0", "eslint-plugin-import": "^2.22.1", "postcss": "^8.2.13",