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..ddc6a9d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "scripts": { "prebuild": "rimraf dist", "build": "concurrently yarn:build:*", - "build:lib": "rollup -c", + "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", @@ -72,6 +74,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"