diff --git a/babel.config.js b/babel.config.js index 0f8518bde..0ec421e33 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,15 +1,15 @@ // eslint-disable-next-line func-names module.exports = function (api) { - api.cache(true); + api.cache(true); - const presets = [['react-app', { absoluteRuntime: false }]]; - const plugins = [ - ['babel-plugin-styled-components'], - ['import', { libraryName: 'lodash', libraryDirectory: '', camel2DashComponentName: false }] - ]; + const presets = [ ["react-app", { "absoluteRuntime": false }] ]; + const plugins = [ + ["babel-plugin-styled-components"], + ["import", { "libraryName": "lodash", "libraryDirectory": "", "camel2DashComponentName": false }] + ]; - return { - presets, - plugins - }; -}; + return { + presets, + plugins + }; +} \ No newline at end of file diff --git a/package.json b/package.json index 8ecd1f675..f9f35ad06 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,6 @@ "url": "https://github.com/comicrelief/component-library.git" }, "dependencies": { - "react-scripts": "4.0.3", - "babel-plugin-import": "^1.13.8", - "@babel/cli": "^7.21.5", "@hookform/resolvers": "^3.9.0", "axios": "^1.7.2", "lazysizes": "^5.3.2", @@ -61,8 +58,7 @@ "test:e2e:local": "export NODE_ENV=development; start-server-and-test styleguide http://localhost:6060 test:e2e", "lint": "eslint src", "lint-fix": "yarn lint --fix", - "build-pr": "rm -rf dist && NODE_ENV=development BABEL_ENV=development yarn babel src --out-dir dist --copy-files --ignore __tests__,spec.js,test.js", - "postinstall": "yarn build-pr" + "build-pr": "rm -rf dist && NODE_ENV=development babel src --out-dir dist --copy-files --ignore __tests__,spec.js,test.js" }, "browserslist": { "production": [ @@ -77,8 +73,10 @@ ] }, "devDependencies": { + "@babel/cli": "^7.21.5", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@playwright/test": "^1.38.1", + "babel-plugin-import": "^1.13.8", "cross-env": "^7.0.3", "ejs": "^3.1.9", "eslint": "^7.32.0", @@ -91,6 +89,7 @@ "jest-styled-components": "^7.1.1", "npm-run-all": "^4.1.5", "prettier": "^2.8.8", + "react-scripts": "4.0.3", "react-styleguidist": "^11.1.7", "react-test-renderer": "^17.0.2", "semantic-release": "^17.4.6",