diff --git a/package-lock.json b/package-lock.json index 02bc469..6375e03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@babel/eslint-parser": "^7.23.3", "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/preset-typescript": "^7.23.3", + "@rollup/plugin-babel": "^6.0.4", "@types/jest": "^29.5.11", "@types/node": "^20.11.0", "@types/prettier": "^2.7.3", @@ -4249,6 +4250,32 @@ "@rjsf/utils": "^5.16.x" } }, + "node_modules/@rollup/plugin-babel": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", + "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@rollup/pluginutils": "^5.0.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + }, + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/pluginutils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", diff --git a/package.json b/package.json index 2b19c03..bbcc010 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@babel/eslint-parser": "^7.23.3", "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/preset-typescript": "^7.23.3", + "@rollup/plugin-babel": "^6.0.4", "@types/jest": "^29.5.11", "@types/node": "^20.11.0", "@types/prettier": "^2.7.3", @@ -47,6 +48,7 @@ "@types/react-dom": "^18.2.18", "@typescript-eslint/eslint-plugin": "^6.18.1", "@typescript-eslint/parser": "^6.18.1", + "esbuild": "^0.20.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", @@ -55,11 +57,10 @@ "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "lerna": "^8.0.2", - "rollup": "^4.9.6", "prettier": "^3.1.1", - "esbuild": "^0.20.0", + "rollup": "^4.9.6", "rollup-plugin-esbuild": "^6.1.1", "rollup-plugin-postcss": "^4.0.2", "typescript": "^5.3.3" } -} \ No newline at end of file +} diff --git a/packages/mantine-corporate/rollup.config.mjs b/packages/mantine-corporate/rollup.config.mjs index efe019f..a817b85 100644 --- a/packages/mantine-corporate/rollup.config.mjs +++ b/packages/mantine-corporate/rollup.config.mjs @@ -1,5 +1,6 @@ import esbuild from 'rollup-plugin-esbuild'; import postcss from 'rollup-plugin-postcss'; +import babel from '@rollup/plugin-babel'; import path from 'path'; const getPath = (storyPath) => path.resolve(process.cwd(), storyPath).replace(/\\/g, '/'); @@ -25,6 +26,9 @@ export default { }, ], plugins: [ + babel({ + babelHelpers: 'runtime', + }), esbuild({ sourceMap: false, tsconfig: getPath('tsconfig.json'), diff --git a/packages/mantine/rollup.config.mjs b/packages/mantine/rollup.config.mjs index efe019f..a817b85 100644 --- a/packages/mantine/rollup.config.mjs +++ b/packages/mantine/rollup.config.mjs @@ -1,5 +1,6 @@ import esbuild from 'rollup-plugin-esbuild'; import postcss from 'rollup-plugin-postcss'; +import babel from '@rollup/plugin-babel'; import path from 'path'; const getPath = (storyPath) => path.resolve(process.cwd(), storyPath).replace(/\\/g, '/'); @@ -25,6 +26,9 @@ export default { }, ], plugins: [ + babel({ + babelHelpers: 'runtime', + }), esbuild({ sourceMap: false, tsconfig: getPath('tsconfig.json'),