diff --git a/babel.config.js b/babel.config.js index 431136a..a879f08 100644 --- a/babel.config.js +++ b/babel.config.js @@ -4,7 +4,6 @@ module.exports = api => { const testPreset = ["@babel/preset-env", {targets: {node: 'current'}}]; const plugins = [ - "@babel/plugin-transform-runtime", "@babel/plugin-syntax-dynamic-import", "@babel/plugin-transform-react-jsx", "@babel/plugin-syntax-function-bind", diff --git a/docker/django b/docker/django index 1d40c2f..8b1e4e4 100644 --- a/docker/django +++ b/docker/django @@ -23,7 +23,7 @@ FROM node:lts AS frontend-build WORKDIR /app -COPY ./*.json ./*.js ./babel.config.json /app/ +COPY ./*.json ./*.js ./babel.config.js /app/ RUN npm ci diff --git a/docker/webpack b/docker/webpack index 782decf..11c3d58 100644 --- a/docker/webpack +++ b/docker/webpack @@ -3,7 +3,7 @@ FROM node:lts WORKDIR /app RUN mkdir /app/src -COPY package*.json webpack.*.js babel.config.json /app/ +COPY package*.json webpack.*.js babel.config.js /app/ RUN npm install diff --git a/jest.config.js b/jest.config.js index 7a66c40..63ae1f3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,5 +5,7 @@ module.exports = { clearMocks: true, coverageDirectory: 'coverage', - transform: {}, + transform: { + '\\.[jt]sx?$': 'babel-jest' + }, }; diff --git a/package-lock.json b/package-lock.json index f279a7f..82a511b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,10 +22,7 @@ "@babel/core": "^7.12.13", "@babel/plugin-proposal-class-properties": "^7.12.13", "@babel/plugin-proposal-function-bind": "^7.12.13", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-function-bind": "^7.12.13", "@babel/plugin-transform-react-jsx": "^7.12.13", - "@babel/plugin-transform-runtime": "^7.12.15", "@babel/preset-env": "^7.12.13", "@babel/register": "^7.12.13", "@babel/runtime": "^7.12.13", @@ -34,7 +31,6 @@ "clean-webpack-plugin": "^3.0.0", "css-loader": "^7.1.2", "fetch-mock": "^8.3.2", - "file-loader": "^6.2.0", "jest": "^29.7.0", "mini-css-extract-plugin": "^2.9.1", "node-fetch": "^2.6.1", @@ -1614,27 +1610,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.4.tgz", - "integrity": "sha512-8hsyG+KUYGY0coX6KUCDancA0Vw225KJ2HJO0yCNr1vq5r+lJTleDaJf0K7iOhjw4SWhu03TMBzYTJ9krmzULQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.8", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.6", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", @@ -4739,6 +4714,8 @@ "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" @@ -4760,6 +4737,8 @@ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", diff --git a/package.json b/package.json index 007df97..128b311 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,7 @@ "@babel/core": "^7.12.13", "@babel/plugin-proposal-class-properties": "^7.12.13", "@babel/plugin-proposal-function-bind": "^7.12.13", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-function-bind": "^7.12.13", "@babel/plugin-transform-react-jsx": "^7.12.13", - "@babel/plugin-transform-runtime": "^7.12.15", "@babel/preset-env": "^7.12.13", "@babel/register": "^7.12.13", "@babel/runtime": "^7.12.13",