diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 226335e9..fdfb9dbf 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -4,14 +4,7 @@ module.exports = ({ config }) => { exclude: [/node_modules/], use: [ { - loader: require.resolve('babel-loader'), - options: { - presets: [ - '@babel/preset-env', - '@babel/preset-react', - '@babel/preset-typescript', - ], - }, + loader: require.resolve('ts-loader'), }, ] }); diff --git a/babel.config.js b/babel.config.js index be7af752..19646cbe 100644 --- a/babel.config.js +++ b/babel.config.js @@ -4,5 +4,4 @@ module.exports = { '@babel/preset-typescript', '@babel/preset-react', ], - plugins: ['react-docgen'], }; diff --git a/package.json b/package.json index b464f019..1f13c288 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/safe-react-components", - "version": "0.8.6", + "version": "0.9.0", "description": "Gnosis UI components", "main": "dist/index.min.js", "typings": "dist/index.d.ts", @@ -52,8 +52,6 @@ "@types/styled-components": "^5.1.15", "@typescript-eslint/eslint-plugin": "^4.31.0", "@typescript-eslint/parser": "^4.31.0", - "babel-loader": "^8.2.3", - "babel-plugin-react-docgen": "^4.2.1", "copy-webpack-plugin": "^6.3.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", @@ -71,6 +69,7 @@ "rimraf": "^3.0.2", "storybook-addon-react-docgen": "^1.2.42", "styled-components": "^5.3.3", + "ts-loader": "^8.2.0", "typescript": "^4.5.0", "url-loader": "^4.1.1", "webpack": "4.43.0", diff --git a/tsconfig.json b/tsconfig.json index 7529c385..8a8dad15 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,11 +15,11 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true, + "noEmit": false, "jsx": "react" }, "include": ["src"], "exclude": [ - "node_modules" + "node_modules", "**/*.stories.ts", "**/*.stories.tsx" ] } diff --git a/webpack.config.js b/webpack.config.js index 75f7e786..9fea02cd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -35,14 +35,7 @@ module.exports = { test: /\.(ts|js)x?$/, exclude: [/node_modules/], use: { - loader: 'babel-loader', - options: { - presets: [ - '@babel/preset-env', - '@babel/preset-react', - '@babel/preset-typescript', - ], - }, + loader: 'ts-loader', }, }, ], diff --git a/yarn.lock b/yarn.lock index b7b5ce86..5facc35c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3434,7 +3434,7 @@ babel-jest@^26.6.3: graceful-fs "^4.2.4" slash "^3.0.0" -babel-loader@^8.2.2, babel-loader@^8.2.3: +babel-loader@^8.2.2: version "8.2.3" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.3.tgz#8986b40f1a64cacfcb4b8429320085ef68b1342d" integrity sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw== @@ -5174,7 +5174,7 @@ endent@^2.0.1: fast-json-parse "^1.0.3" objectorarray "^1.0.5" -enhanced-resolve@^4.1.0, enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: +enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0, enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== @@ -8330,7 +8330,7 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2, micromatch@^4.0.4: +micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -11283,6 +11283,17 @@ ts-essentials@^2.0.3: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== +ts-loader@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.3.0.tgz#83360496d6f8004fab35825279132c93412edf33" + integrity sha512-MgGly4I6cStsJy27ViE32UoqxPTN9Xly4anxxVyaIWR+9BGxboV4EyJBGfR3RePV7Ksjj3rHmPZJeIt+7o4Vag== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^4.0.0" + loader-utils "^2.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + ts-pnp@^1.1.6: version "1.2.0" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"