{"_id":"@module-federation/next-transpile-modules","_rev":"63-6377dfcfdeaa858fd2a865e203d8fa5d","name":"@module-federation/next-transpile-modules","dist-tags":{"next":"6.4.1-beta.0","latest":"7.2.1"},"versions":{"3.0.2-beta.0":{"name":"@module-federation/next-transpile-modules","version":"3.0.2-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.0.2-beta.0","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/module-federation/next-transpile-modules#readme","bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"dist":{"shasum":"0d8a5300014711792e64047d233bf33ba376d36e","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.0.2-beta.0.tgz","fileCount":4,"integrity":"sha512-+20nZaqV0MEBWRnuoihPxFDvMP/Te7G++JF/ROp5XnbMphOdjrUbbkAGPsSnWDnjZo/xz4p80lVRovuNC+hlzQ==","signatures":[{"sig":"MEUCICW+CpdnirQUQ9W28VR92zeZdKkWetZUwn8R+V8GVDFJAiEAoUuUtae7oGTbFBWEjdDE66WcrJrESmTJMWwHy0pWHLM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYYctCRA9TVsSAnZWagAAZksP/iLVHypaeC/dBnH1b1n7\nAAji4JaJ0ShY5Ejm5O1xxgmXw88Lr81cApoXP9tujmZDPSndGTAXut+gyALW\n6kBhazIxZtT1Xbl7oZ1DUaNaRm+HFuNFM44AvvQdCPPvCiHBU0dw2WVfnJdd\nHBuwXxzUh0M/Nn1UFj4yiYC64UsclhumI0HI4pKzrDmdjcQLnx2LZSX07sUK\n8YH9d8ZBU5mGc1/MKuP9r6ABqu4tv9+IDrDUq+kiapXgp9aw0+MOsTBmOTm3\nsKR4Jlako3hXRfXZBeFcanAmLqA/qwcf/G0HXbJgbEEK45RTeWJC6zW4vSoP\nqZHdL4D1TyGQ+xpH+RkCk1lILMKh/H9o8+x6DxI/E1pWs7on/qDYaX+WFxOT\nWyZqTOPGBLUL5c6V++Q4D4uD4lilVQP9RFm/rmIQL78zgF8qESscALl4PEtm\nDMb+JfEPD4Un6CJldMDY5VNvPx9D+tltwKRDV4p+/4L1l2FotrdW3y/XxwUa\nlaZkSKatIY1HoCllv0qI/UuNXNJNRYLaUYw7LjEmZ2Xn1CoAaRDtHltB9lOP\n147/BUu/lyl0EAgcMAJcpvzVWBtRmFkzkZnQIxiPZhLnWHI0gXsGbsQcLWmf\nHAk4hbZ7G5ie+7k4QIm7ZVR/gJj+ieS4giQ/mnUmhd/59JiXEFSjZN0NzE1E\nPuTT\r\n=AIN8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"41990ff3ed6b66770bfd6313d226cea0071642ee","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\""},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"_npmVersion":"6.13.4","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"10.18.1","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"24.9.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.6.0","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.9.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.0.2-beta.0_1583449901031_0.6932762197165834","host":"s3://npm-registry-packages"}},"3.0.2-beta.1":{"name":"@module-federation/next-transpile-modules","version":"3.0.2-beta.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.0.2-beta.1","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/module-federation/next-transpile-modules#readme","bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"dist":{"shasum":"1ed5de5e215ea074658c852d5b4ac41624c148b0","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.0.2-beta.1.tgz","fileCount":4,"integrity":"sha512-Dn6dYIDE5b53JOvSYJjobIKByMSUSUEIdeJH/eBIXsOYW7l/hDVm5sRJAqEaxH37Wc/Brhy8twB49q9zeJg78g==","signatures":[{"sig":"MEQCIAKvSnA2K+SJRZm7+UwZIjkW5TC3FlQD1RoY0zJ6RjVfAiAzmLpDaA3bhoVtqNefgCe/WGMuc5NcnSl6upRRjPEfqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYZMLCRA9TVsSAnZWagAAe90P/1WHn8D7br9TSCNMS+89\n+s+kiyqR3SZ9ARy1sSv0T4jtDKHE+GzBGjBxvJ6MOAZykblkERjt047vFlJb\n1S0KMENC6aB5WExGqRIEpgXfe1EOLe/89MCqUj+n/3hwv8uIgBYmxqOTTW3+\nDnJq50YnpRl7e1RkvuIbbpWjlZ/9+hKH3NV/LYF6uNbAEmlDxruq6SMl2CDg\nottBlQUEqWPFXsQSM8Hgs1t3LAMuyd6vXM7OWxWH/ZoPvzmFidL9VUwkWuS5\n2jQzbmRdgMClyJBtnHgNzb/imxpdNi9J+DRCYYthIrocWq/b/y77YJSnQ6DB\ntlwS5hY68hgIxxN+v5mCL307k5y1kdb6RGwz7XYuCdtEIY+X6FKuumLKzA1h\nyB49F0DbKi933VwxEfj36iDduA4lD5mx32Nfk9BgIkZexrkOpgYygbrg+NeS\nx9e4S27ysU3cEzgnnM9b/nYlHBeoQJIVHh+aQz/IFb3Vwk8C2D6qvKOeKvkn\nbHA7a8NRtwk2uX5DzrPPmtEMxKFkeD5z62jaXM2heuadxTMN0ddQPJlnU9PB\nGWsJYYsDiGQ1Vj2xtoq7syDXhu6vC320vYP/wl5V20PdiR1lX4meGlNgMOME\nXkjsLLGSlaT8Ia6AGM2IALMuUK759VfS9q1CCENGsZNU28V0WogjmkJl/pjm\n1f0m\r\n=AWuz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"7be9df7ae3c2f6d7d88036497a330a559dd5276d","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\""},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"_npmVersion":"6.13.4","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"10.18.1","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"24.9.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.6.0","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.9.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.0.2-beta.1_1583452939033_0.4454716659031359","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@module-federation/next-transpile-modules","version":"3.3.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"c1a5f6066054fe9835c7c7a9b51af2b265b48c39","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.0.tgz","fileCount":4,"integrity":"sha512-HyWCwS1NwvyC9x5zK1J7R9jlLOts6bVfgeJO8O8lhwKgs7ZEFzki0ml3qb6UxlWutZcitaxvXXxQlAF792/h+g==","signatures":[{"sig":"MEUCIDyrZBEdgzMC54QlRFPpolskQJqzWPZGHDInEisIJ5CSAiEAyAn77wwur8MoS6eJOmjVLA5EYg9ejVkBk55lB/lkHm0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBMV0CRA9TVsSAnZWagAAXOwP/27GdIQohiz1uCa90o36\nj9cFYdOUPFKbPovyNmA23SD9CBwA+JxcEeZ3AmOFYiuHJtncbsnDpzfUQ6I0\nZvmT7JWgR2Ov3di4LztnfKEF/Pir5UhDxHnsD4s6Td4gZHpRZSa+ULhpn59D\nzHY1sYzkv1/CF2C36E7Sg91lKLQQ33Qp2PTZAtW5z5CpKxfk8KvH4zvqs2hH\nNWeQVGfPc8BjvDN1Nu8H2XVdBaTZuQCUX/Y4lgHXGFsrlsgOWjUc7nu5oyFs\nt0F6ohqTWUgfEU01D2SyRx/L4jnhs8B93WFQ9eReb5W5S6oYD63OKxZUje0v\npU1/xenS+jMgIMz/t29bvDh0VcFT5E9LhUshbTEGW6M0deJ1S2VmNB0GnHf2\nNoxJaHAfMlnONc449szBTcTktEnmD00ZLPA58Py4hl2O00tCBSviE8zqC2ev\nHDSbOcomWL4CZ+cL7ZMhBhG40/XYCkh9kFj2aQ4Acr2rGlplmcLbmC4ShfH0\n1xqAaqZMFNV8JsfwfTEwPmC9sYKUlMZL6VsmhCPT98jblCc619487cm2RgvK\npZFqckAeOruVAGF1vN4lXsgAZCyDRXm4EXmbdaBs3CSXcLby3SWYuH/yXWVM\nTYdnMGP4lrMQf8U7Rfo2D3Dj68kNyQaQi7aDLdRkklFREPXFL7ij0hJejLN4\nwDdM\r\n=Vud1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"dec4023a99883684062f1df21914f9e0cb8b788b","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"_npmVersion":"6.9.0","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"12.6.0","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.0_1594148211472_0.08904164963415595","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"@module-federation/next-transpile-modules","version":"3.3.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"9f23d6e368f2f5aa825d1836c98a38aefc0120f7","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.1.tgz","fileCount":4,"integrity":"sha512-mMFUZe/7ikLIj9z6F04JHS6SMdWpGlKkIpJ7grdFtYm07rzK4ixzCvt9t+8rqtHW66ByK7BcdbnAHdRkeV3HKg==","signatures":[{"sig":"MEUCIEXvOMRY+S7jYEdDG3utW5iCdfYFIkL0RmEK5nxIJpPhAiEAh++MwOcLHFQ/Rtmvnbdj1BE+NToQWM7pA2Zo0dM419Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBMaACRA9TVsSAnZWagAAZgMP/1GbjDpMjJkSxADGOWO7\nrwln9CAn5C5HvieRjBsKTaCP2aYbm8ZyztoubrRO9AlpSwDTmRSWcCBDRHQp\nm0CRx3g/rJc4bMGmQOetlWJ15S0ymwJ3Yu2T6SWumyHkGi3V8OMDHlAutx9b\n+/5UhtkGEjrHSt1FBdHF6LqVoBSTuem17DVUmK/OTt4nt0KF9fA6oXKuibFl\ni9SuHw5T5zu1AooFuum/iL4kxmEoI88aX9dQYGgNl3ZsOuiV+y5HmzKrDsy4\nWCMgYVJz2LtF5qOuxJbvd3I6ikHdiIsc2OWeV++NtiVE6bwuQ4TEsoUbvQYC\nGhLDvCJqUQWA0HFEJuJetjnSk1+jxa+pi5NOmNNFEvg//AF3mR8io8v7qevs\nDiOyFxEJL8maSpEJyNsbg+rU4iM73HrwqLI5Tja32LPnNuyFmgXpxvesIVTp\n9QCYa2I3i5T/wWLbtyJi+4MdUKQHKCaXBfniKrnkjm25NFhHw/LjDeuPxhTu\n6WXlxEZ7uiXAC0t1gUe12pihikbXsPQpqFlIhtSv1UAku/QjaOT7pUDZjNmL\ngyjU3bCGEXp11NSmW/0FHOJDxptjn384kCdbPOF5ugTr0vMMsxjaXyYw2wP8\nh8FZjXJjxNMiFMe1PKjH6yx0dR/5PwRHorT+yLv5PW29TzLAgo9PzYK9nYbV\nw46z\r\n=Z1lD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"a4ff1bad5f2d6bb6c2857975a48a66c1be71cc70","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"_npmVersion":"6.9.0","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"12.6.0","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.1_1594148480137_0.8363359965442672","host":"s3://npm-registry-packages"}},"3.3.2":{"name":"@module-federation/next-transpile-modules","version":"3.3.2","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.2","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"0250d3470c710ff5b695f45d1ac764b7fef69ac7","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.2.tgz","fileCount":4,"integrity":"sha512-BtbW9IyeCteXEFJA9pnrlsaFONuFjOM7MbH/Izaf9iJfbHDIQYginpVsyjSHbZ1dQXr8OPycZGUTg2XAUuaWQA==","signatures":[{"sig":"MEUCIGeYWUHdR9UMO5mKYQPEwIFmI2/5kQH2/mTq6CRqLJvzAiEAyN9Nkez+ppI4ooLs0/eR/IICCOzledcMJEK70hEEq44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBNNeCRA9TVsSAnZWagAA0qwP/07axLIkI0aLfGpBKKh3\ntNnKell0uVxr8oUsGtquhqeu/RpSr/zvl31/FmwA9DRpMTTH8ZSTLUC3iuQ2\nGP9wy978YpleIHIJb/6YhjSEBlJNnVX6TyXI5G3ZYk3KJUhpZeoJFaq6xDOj\nS5fC0/rAy0EHW+GJIN7d2E3znD42bpxiGDXdhseIsXS916ha5FzvCJBONxLh\nsREMCbxnQAK6BocbpIqu4Uq5mg/hM5TKKe7yej6vSTPZuFhmC6RkuERaxMYG\nPfz7tsNjHDFzmerxFLU85bnjyfg+gJutCfKLzpfxT/6fEnkLov6sRr07KFME\n0dRqWQbyaDdUqFYobo8LSnU3sQBkG0PikmZJF1u7nCnuZ4l/n8LsSlzNS7gp\n4a7in2uAfcIS9GOu0O4eqgmRYBd3dgTS1YVHplA05WPEMjm2K+E4nAFG7jJB\nGGd4/qNIaJCqYnPXr42u5L8mBApq+cDOytRpNgZH0HeOP3KvzESINExLiCQq\n9DojCJfU7GDKyza8E/FSN82Kml7JmC8/RLjJOQ3Gld7NVtW1v3wAK39DQ0pN\n0mLp/vfM3ts7Uor9lW8f9i2l6ebIeJQmUHYaOtmMsP2xKbEvsxShIhJ0tDXE\nyOtCOhTUH7A18fGHMDbTeSJHYp24iBqu81EEk/YrVirlkafCx/ThxdvmsR/G\nuB2a\r\n=migQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"2de16a38c3d3825676044f73efde2de71cf279d8","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"_npmVersion":"6.9.0","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"12.6.0","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.2_1594151774550_0.7611929135863751","host":"s3://npm-registry-packages"}},"3.3.3":{"name":"@module-federation/next-transpile-modules","version":"3.3.3","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.3","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"1c0512f84f102103cc8d9d61c10cddfe8cf3ee36","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.3.tgz","fileCount":4,"integrity":"sha512-6Km2Pjx0ZBMpVFiWsngumQEzUwaUYs4CwNcQaZTmXg2x4FXdkzNNLhdvEZ3/A1P5E0VB6Yyih0OJG/afSUYzQA==","signatures":[{"sig":"MEQCIA2nn+WdkuqlRhvcOzU7rxMsyQ7ub/hmUZr37cZEu90CAiAC7wVNENp2b4Kq+6AYmXmMRyWwHEiglMPg3Xp2uzVbgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBh+YCRA9TVsSAnZWagAA3NgP/3KqgEilwAreXAsfJeHB\nX/XOa5VvgCqvKeYLft3tBxh4+4XtZIjgpIyAFk9+EmMcUWT3fankM2v2EOjR\nbMom5n4HUnGNH/vEtkdjzMX69NHDcaIEB/CMyjdsFS6+TcIM/RKoEbMmOxbe\nA42QLnkdaUsss3tb0nsZXhZxSNghOI76f4uUHklB6jG7293xiNihN+TqidyG\ng8sNDyzNFHU365qy1qjh+CTmmKCdjOSWYAJajR53sshznTmYLhBk1N3vhvzE\ngURRrBqSD4YLVcFAj98IG5yXiMV0t3mMSofHjn3QVtbrV/vc5M/h81ATMr0d\nSk0F88iYjx9gWsy8f4T3eweZWJVOuPO7YVifl9B3DLEoI6cDSZJZoMlAlCOg\nj0/9h/HgeAjbsTJEi+IH8cGQuUVrr//7xxJ4hDlfPQ7uHA7LyQFEdJInA+EJ\n8jvgTyR/38Bexb1FwvAkFJnGzqHdC7WvGiubCuMQ1eSd03Fkn99ehd9Iw1gj\nQL5qP5MiHvS+LWgZ8vV+5u9cd6ve0FGuNFjsL/jBVzD8UnEkuEzijDaOxxXO\nkMzkV+VB12rRcRnEQ5Uu89KsoelJswMzOfJ0pGX0cW9Ohndv7oFDP4TYgVFS\n/RFjo5SXY7APM/R01R7GSJucHN24Dtw8aaZRnYzVkkmGuo3OGrYXswZ47Pss\ncBVe\r\n=pb0S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"68bf3e3e545fa32a2f01aac246a27b01fdb2971b","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"_npmVersion":"6.9.0","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"12.6.0","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.3_1594236824162_0.5135440501175301","host":"s3://npm-registry-packages"}},"3.3.4":{"name":"@module-federation/next-transpile-modules","version":"3.3.4","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.4","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"dde7de02449ff00c3306462edbd11c7b1ed50f5c","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.4.tgz","fileCount":4,"integrity":"sha512-db+b33eIqzqesMxKn2bx3g5c8f47qUA+m6ZdaxqPWZnf/bEzE+GD5B0IOnlkzFQRLXV3HyYcnP+aZqRq5rQGqQ==","signatures":[{"sig":"MEQCID5hPSefO6grUhC2rNg/l7qI/17J3iqkw/TJi62s0rK1AiACBHfW2y+OhAJwxxuqc8VZxZ6Mv6TlY67Is0dq4HUieQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBiG8CRA9TVsSAnZWagAAiXUP/iyByGiYc7IOuQCXdsJ8\nql7F5r93cqlI90iVB8oHWsl668UcKXVt2ZL83RAxg7GgQFRvPJ9OVR4zHqYe\nUQk7wPhrOTYlIwUvJMfbiGPGUUJW1Sa98IDAqsYMu+iidpB5JNOOuStwNF5p\n3HZKacq3qsysfBj7GeUtqrORFxmVE1ToebHC1pDIrXAYlzyMTCFENw0uUcz1\nuljgz10c5ZgT84WubediLgXvJVqkulXASY7qK8umqaqUQuEyeXzppT3Vyzig\nArxawS6WBYwFMVi6/sJgKzmOOVaGuuBUXyUrZW2yqsroXEHXH5gsCKlXX7gy\n9pzfXk4RYHVlZ2KTDx3ayzpLQa0cHW49MhR6s1hZJehT3eWmQpQCh9x/Jy4j\n7XBgEt58D3RNnFK2p7otUXbm0ViPQ1psTuTT6tuNUikmLwdzforM4Z8niUxo\n5RZOB4pSyJOySNGBzG3T+bX0z3+cuCT+43LdGh0KKFZtYwSUp/gtWQDcQlIW\nOf9n+9o1EYEx1Z/zV0nxebDeFp9vkHNt5PuTqeDIxCZ299tNpNKIJ3Mu+AkK\nYZvbghWrn2Fj8+X8UJslHAJ0INIIrZdWN6pPRcVuOdCYdBW76zUE/7105flf\no+6kwMehHOn86aVJzG3xReUfxeFFlqWw5ena2ktYZDo+UnhFs9IvTqhk4S0d\nXGp+\r\n=F4Rv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","gitHead":"68bf3e3e545fa32a2f01aac246a27b01fdb2971b","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"_npmVersion":"6.9.0","description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"_nodeVersion":"12.6.0","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.4_1594237372417_0.43899548785102604","host":"s3://npm-registry-packages"}},"3.3.5":{"name":"@module-federation/next-transpile-modules","version":"3.3.5","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.5","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"0985314e6d56b117d7ffc601b8126e5c2083b772","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.5.tgz","fileCount":6,"integrity":"sha512-dvar0yNKjpMChPwYZsjL3zzGUQYh1kfU3x2Bhy80hKjEsFFGqjzbKbct746T03wp+yuzr2QVeZxVmRJieWwmjA==","signatures":[{"sig":"MEYCIQDYyveC+hnb4yENlhkQTcP3b8kjOqYP7Iru9GYH25giKgIhAJkR3yyFAGk4fLjb1nPz4xyrODhxC5TSvjpS7B3TYb+o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEJviCRA9TVsSAnZWagAAnCEP/39azQX22uGa23se4SOM\nR/fBehGS8INmAafMV4a5hXchLMVWotUYMYRtLS6vjFqbpXqK5FmcmrQK/A2X\nqNRJM1xHOBnQfYH2H0f7Knes/hI+o2vpNBMjgqCggr9MJQkifNrEN+gllhVs\nEgvQ1h9MNUKlaSgTgK/s5qjvWY4qEjXoSzEWqlq6RQol0vKF/jWi7T7lMr07\nyDCc1QeBFJ0TTJA7rXcFyUBKsbneso5PPO5wxhsIN2CHDFd+u70U7BBMjSpy\n4aITgt6HcG5u4xYfJrDD1go7NCLcagxQ9hstF+iN8Y1Mq51H5NCz8eGsHkOr\nkXKGeA22JAW6VZF2jHZQB8h6frb+uuDN0zya9M+RzrOtEkSdOQh/eIhBHuku\nNz9/TwyV/TYRX4V3h1D79I2NzdNtTJf3TzW3LL3Q5S/jtY7SgsXi7Bl4titw\nXO2+24KJaUXCHWcsQLajUdzeXX7+6LqwJBih7KRaf46jqsgwfdULapc+hK6R\n8NopSZMVyq6ub1sUqf9YUeM7pNj/9E96jThR0cERkhrIMsn7QApTw4e6tchT\nQUOKTzOwupWQLiJQbKYVg5vvY6fYFL5lY6bUNghnrYb7lyvhY4oVXr24XH1w\nTKJhXDmCqvRfM0ZxH7UQnCkPxHbD6U4gxuMkaqDyyXzHpfpgepilFXVtK3Rl\n2Aao\r\n=YVtP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.5_1594924002058_0.6944590904367907","host":"s3://npm-registry-packages"}},"3.3.6":{"name":"@module-federation/next-transpile-modules","version":"3.3.6","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.6","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"d86a399caaec4c1b7ac7dc8283be27aacef26f1c","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.6.tgz","fileCount":6,"integrity":"sha512-Th5APTLhENoFUfqrquHPaL820TDeMSecunsZyHL5vEg/704FyglHlL7pFotHlLLMPQrqKPWryizoQRykT3bujQ==","signatures":[{"sig":"MEUCIQCimcbPRwTmsts/UkyCCwPDXXEuVrfhK9tPb1PPhYVthQIgS2BubBabbSlWLmy56Xq9JGMYiePpezuQhFdNWT7Xwbc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEKldCRA9TVsSAnZWagAAio0P/i3wHJBXyDTD8D/IUf4/\n6Bvf5tuP4kOWTmAWk+ebUJ0FM7NUgZ80Z7T9PKW44IRR645Qz9zAzG+U44cs\nEq6bxRXSFK5JwG9VKCEjAaOY+0gXy7rDiN9ZSc1Rfr34qOzq0jpSk3g0gv1A\n6gk9FoZOnOMnMNv4YGbCihArMsa1XYjaLv2N4qVpm3y9kXxNwenvyCkOSULe\nadSUlHhy5NjuAtJ84xE0rvILcplLF/tkZLq8QG9QxmfIMx6qLr771n7raM56\niHVTnukta0fuzY9EJPvcuQ41NSazLkWFS6wrL7mFkBvMwMN35zPr9jK3SvIG\nBsSgbiWmHamgNcQllU+UcSpKSccJRuJfqETHqJoTSew7TFz+vV0ZbhCe2BCV\nVuTaLtmsfBzloGtYdXT+vDDUMLZ26H9xlzVgc57zZtjQszUQkmA8bcp8RAzh\ntDAhuFTBBlilQ+0Y5mHf0nhHFS+Qfg+WdW96/JJDqwFg/E/wJlmpczXFLGUT\nGjNcBlv2riPyKXhwkbnbeAeDyaNqmgsog5ZJeEpaCKt+C/JhyqgGitFRCR8e\nwd9prnvCb0ZsCyVY/M3e0pr0wfi5v6tM3XhyDEjIsAMgvu0qF4PYyNyB3Opn\n7mLyZNCM3gORJqzgSY64W468CvS/1BnX3uoswbazYvSHSL20MAnC77mX70QS\nE6EA\r\n=5Q82\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.6_1594927452751_0.8959985904201304","host":"s3://npm-registry-packages"}},"3.3.7":{"name":"@module-federation/next-transpile-modules","version":"3.3.7","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.7","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"980ab1da8e26357f39afa3f37079265553ed7f71","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.7.tgz","fileCount":6,"integrity":"sha512-7jS4w2w58LgNV8ZKFFZ9lcR5Gwnx+LTH/1IGEY8uF+BQ3hJoKIJ3D9IdpjL0s3dRKXpVzk7fU9j+vV7IJfuN2Q==","signatures":[{"sig":"MEYCIQDK2a2s6S8dI7uxNL+UrKMcKf4wD2eVKyF348aGY7CpawIhAKZh5kHOXCGzXoEYjJOBs6+jA6pyQE35Sx0cxCygERkF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEO1FCRA9TVsSAnZWagAACLwP/0uTo0ayrhj5hIDy4HKP\nt625nzoS6ru4Rye1c9XMtohjEG4XT1VsyW6gpqMzFOJ5DG3zWIQiLE9az3K+\nJR4BKA7Ac8tMnWAzRHBl3niK8/AkG4fAouu1Z12ycnhXV4gGEyAF7++pQq9q\nnhhy8NeU+TgN197d8yDNA2rZz8ciFlbhQL8Ms44LkT5SH3Eu+ucGMzNgBvCi\nocZB6WqHP8GEw4fvUfCJn3Upw3tKcjaTQ//qSomXYUMS8LcovMgjm+bSSFjQ\nlk3hgnkgjKN4rarB4rlINvnlrAyvDUpps/5QVmGshKk7T58y4OtotrEHlTma\nkhAxr/p+ZTNEsMsEZrFkasjGRaesDd7yiFkG2+V1QZuAU9A0NmuwoT6dHub4\nBCkfiFirgkKrc8YooFGD6ZgOpfOUj1LR8Hj06oTGU5L1pFvENzrD+9gk2d1J\nSJJR9UH4xOgicoT5vABWqR3OS1v8fBCCGy7swcGWj2RQqij2ECKASYCblKYa\n4ztM2vFMiMPA29/Cy1/aIXRWHHyPaiSw2oxfQqagYNx+mDfGNE4qkOr+yNo/\n53L5hjI69vE+9RVOgYkHGwXrxxUM7ZvuYP7PyP+aXt/ThLu7dd8FcDwug+TZ\n35izU67ByCEw4lFx+uJGvlHxeX1GaWvZ4Ed6XFIaHrUqyix6sSQxYk7whlYP\ntAyK\r\n=hgwQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.7_1594944836636_0.691936183667762","host":"s3://npm-registry-packages"}},"3.3.8":{"name":"@module-federation/next-transpile-modules","version":"3.3.8","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.8","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"9a02a12f914c80556dfc9bcba0e424091e059ece","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.8.tgz","fileCount":6,"integrity":"sha512-oevnbQd9uOeqhUrJocV63hAGfYa3/ZUk9S2MqMnJgE+otY2b71vU8MYq7ljhpjw/eQlqyTJNaR8DlmDaTsvupw==","signatures":[{"sig":"MEQCIF+GqG8++Gbq5wywodt0c3BV6F7Ae77jr7PTurf9hHjBAiAPxC4Q/GyfxwLmg6wBM2l6++JHp+LDMqwhRsPT0UCW+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEO+eCRA9TVsSAnZWagAA0lEP/1+08kFW5d6A3JcNAxzT\nPqGqnr88LGmXcYiMAot/1FDO/egmuIrn3j/rN2xpv2T0dhh1mdR5vi7c7no+\nWW6TGbOQs3ROXeFK0NV+yGPWS+TvSUGyWjwBC1oCdGHocvRSBR5NKav9roMn\nAmW42m5eNWc1PCM/fAGZCXilXH9v0rlMUqyOrhM+xHD+WBBzFdog5ycWLWRM\nvrpZ91csyVMnM2DzuDfLjfHsFT1X0Jbw1Js8bisRVamUJXRR7pQWenmMYtZe\nCj6roEKzoldJs1hEBic7dLTKUzQ7G5cYPveWc/mvCMcFVjXlGY7Y6b/tMZmd\nV4QLWfuXKmqQqWvnkQbrYf5OWI13jL0b3jOZgWWZ1MiSFtDfjm+bD9owrXr8\nfHLOrMYPHISV+LtRdgX11QX5aHn528KNKFP69hNXSba7t9gSOdz/GGnvm3vO\nT3pf+RXvHtahqqitY9Rx8CuItqnwxDSaXsawetMfpQxTKQOWIJrA/qHZoHyd\nH/+Oe8MwSUwtMisORpP99Z8hb7rY4tabH+oghxl7A8nnBsLzQdAQyNVNDLrO\nbKh9dk4EdS6ZJmviNJ96SERGoX7Df7FJORkPyMcV2nR46xU1XzlD5qGMnnpq\numYSCoqCcovlDZmm09k7+6JdCU//ELsajDl1RWsdT7TY867ZIq50FlO4PJSK\nIkWt\r\n=p4Zm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.8_1594945437683_0.790352849392852","host":"s3://npm-registry-packages"}},"3.3.9":{"name":"@module-federation/next-transpile-modules","version":"3.3.9","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.9","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"510b941436b47e730cb8f46108c787b453179184","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.9.tgz","fileCount":6,"integrity":"sha512-YHqcr+tTxHQqvSpayzwxpMkvHqvrvxg5XGLIsK+tMdqf7j7sIkTrtmRxfql8Jr4zC4LOjOtGxVUYOhj9kW6z7Q==","signatures":[{"sig":"MEUCIHT+yFulQBIxERTcM18TFTXPkQl60tJQOUvy7ICTsnOCAiEAgEx05uTgwkdCSYQRsDoTup/KuKRZssPjHWRQ6Os/BSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF3NPCRA9TVsSAnZWagAAGtsP/Aqz/LbzoNfIMXMSITZU\nm1uVKiQ1Oms3/+mMB+4fQqguYwlDNzDzeZPSgSrdZNfnhIRAL34vCFaWB0ZX\nq7M/+X8dqLjiII3xunnN1kcseuYqVJ0Go72SvMAcKav1ElCDLAns42yhLS3B\nokU/Jy1dPzZlXvTZPuNwC41RwKAsxbmQSIYxiBOvmcihM/4zOUYMiFlOx+ft\nHOik2bcbM7pvR9xuhasxYQNJLBHKUo5G33htHaALA1iX8YXlvQeNmRHLSowK\naaASMzIzvl16I7PceQUUbY8uzBPCyVQCvQCo9Oz+8v8J3QKYYppmpWKSohSM\njCTgnjESZpzKBCOMWPkoElaptR/JNXq3XRAMs0nJNnslt9Au/INlfWCSRWAS\nUR0oKxW0s1EWlyfJ45MlT1Dx8+heqkhrB6kcxP6/DBV8kYLY47E6Tua5cvLH\n7JuyUH9sJ/WDwJ7fxTDUt65J8Dkg31aHZe/SCh2MHkvtA5zm+b6585BT9K51\nXbO+5gHENgwG9T+PQI78JPwFh/yuezjlMawAeAA0IGoyZzR0GK9HXHH253gb\nYT8d0hLZNyKBhgo5BlSxR7iOOefosA7Zr+wh3lqqT7YGjx4kyTJqdwccWEm2\nZGNlWCy5p6NLj5pIrOB+ckoHzTDE7YpibELeT3xw6gJkVlxq+mvaQG9YGXNC\nu7LF\r\n=BtT/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.9_1595372366688_0.6813958030088836","host":"s3://npm-registry-packages"}},"3.3.10":{"name":"@module-federation/next-transpile-modules","version":"3.3.10","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.10","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"458593e684a1cf42348f9629bf3493cdb076744c","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.10.tgz","fileCount":6,"integrity":"sha512-BflR0FdDgNU9AgsbmJHt7j9co184G4NqVtJaQ8ACN9ydCk6AdAso4l8Jryau25zNePzbadZwFaHb+Ubs1ISE8g==","signatures":[{"sig":"MEUCIFGxEyltDH9+phIjLQS77RY3lNd5gck2JNNisHwyONEqAiEAuHUfK5VTEV1L5/G826XVIXy3uYfYhfm3Qf+QAQXSkF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF3UCCRA9TVsSAnZWagAAkzMP/RqIdxh8JFXdjXMvd/nJ\nCyrt3eV8V2pBh4cBzo4Y/Qh6RwGWFFlD2wtRzVEiv2E4Qh9gxU6fub4gL/Bp\nAIa6/3s83e9jFpWMs1k8LTag2W40/FAFF9pRI90KOuO3wTES7dyS5/gSE6Vp\n4mEAGwVHz0B0BzxVV2FMrwIIBGYU8tl0/Xri1uHsqALzXsG8x7GuOlSt8JvK\n4/28yV/25uwFUXpOYuNU5+7a8Lc7k1M7CKI0V3j9hpK/jE6umdfG6YYd+B29\ne9SthuxR+vYq/4rnJe+TYYDaxBBNupde3kg4G91LFZeQi9TUa2e8Rs92BuyV\n1wixyN1DgxTLuDcUWYes34LqhGhBYGxzy6EUPJQHo3NQRwbOd/fIVXY0Ksfj\nxgXL1fYgv4QKqi6XlLo/zeDCKEED2j15upJXltRmDlrohNjiBj8pX85xxgUc\nPqtWE/MBXZdvJdZy+tLevqecUb3sk+PQYJ0GXQQ/krhz6u1qCK2LpoH2Ymy+\nTLCY4O+bA0LOkGyVoN1/3S+et5xxJWqGUobhsn+TVhFfmGSw2dwbIOzprVYH\nzY4nT4/BfnS2bDusLGO4kFj4tdbvCHEh7eGFhmFwDn0qahhtsLNrTA7H84c5\nM7NIGCkEt48nPB7AWVUZmbaCO2q2hMTqA6QBI9eTj76ggmvuj1NFH1kAIwXW\nTWlp\r\n=4uev\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","webpack":"^5.0.0-beta.21","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.10_1595372802318_0.3672143455617425","host":"s3://npm-registry-packages"}},"3.3.11":{"name":"@module-federation/next-transpile-modules","version":"3.3.11","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.3.11","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"9bd55a06fada2a6626913164a81a3454c2889ad2","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.3.11.tgz","fileCount":6,"integrity":"sha512-cKybwAjZKvdbO8RJbxIGsLyZikZKWS9hfhDrDVsNjArY3fQRfv0LYsxn5alKpjGf94/lrgbV28IGQAXz+zIAIA==","signatures":[{"sig":"MEQCIEbP61H1BEUUEXtxL2zmjI4uRaZGM1PiwlSnIiWa/d9AAiBEq/c1CgMuiMP7u2kKugiIiwWvEhi0OsqcfrGMC12EIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIGjnCRA9TVsSAnZWagAAt3AP/1+sxBS9fE4Q4fka131b\np8RWO877TVkIUuD2m3LV0q/FbhKj3K/W3rkU5Y3KTtsbqXRBHy97oS4Hr0RW\n/EO7ayuEEdf/+a9c5ShbsNwJZE2t4+CpiRQGI+jczzeiCVyG/OdKUyvG0flY\nmy3Fh4eSrI9kD29cOJENOEsh8sLVHQAu/aTSYBrrh8O9vi+j3f+sdRNd97Sd\nCHihJs1LqDwIV99rQk7HdCQFclBBiT26ylY7Y6E5TtgykvPY09Rw3CkI7HBK\nNciwC6CiYFF7PXsTBkcsu5EFz/xx/iJeE7vmYJAwAETKDLUZQxbNaFHKs7Db\nhocRTII2iH3K2949L4a2sYKAzNbJx675u7z8TLdVDpz4pZp7M57n+EpWtKdm\nUECZNCL2qxgM5feotGmGPU3IpJyAiV3Gs6xFiYI7OSH4E4T0HFoC/l1g3PT9\n+Ym31cuD+jxDfOi7fO0Ib5EVjdXfRGyNZKgLwrB9M3rS+cfDiQDUVPqJ0RZX\nLv+G/mT8eQ8ntPL6NfWjLGI/Vuo3b+aZTTEbeNl41b3OtjoE6eE/O87syjmi\n4IUf4RcYTdBPKTj8nStL2f32QBX1xWejqLMuACxG2LBQLDBjfhryxgeRmlGT\n+b3Uru8xK7R6meTEyUcvkZUjKsyxxGs17TyazGdAAptd74sFY+3b4D9ihQTk\nqBJ4\r\n=KqX6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"^2.1.1","@types/react":"^16.9.41","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"^4.3.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.3.11_1595959526619_0.1629298321588899","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@module-federation/next-transpile-modules","version":"4.0.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.0.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"f7042506c3eb1474637e82ff029fa96cc20a2279","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.0.1.tgz","fileCount":6,"integrity":"sha512-EGhe2H7PU7Qi2Xov7KmIX0JYWuss4pDwUBU0lgut4mOqi6J7pW6ya3WEYRklG9k6Ew0YQtv4aFOx+/q1jeEceA==","signatures":[{"sig":"MEUCIQDNjSHbJk0yAHHgTk0E04ICN3ABrb63oBA8KYZlJNclsgIgIIXgtyk+Qfv67ASIzVRHE9xLCxo+bK0aXvxhZZ773vM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIGwcCRA9TVsSAnZWagAA0BwP/3yangkCdY9M6y1coatD\nW/0laY+057DirAh7luWB3GFoymYfLPpWG02PtuWJ7UQD/WOU/OO6nBOHq7wo\nFnpviZhRIw3CkVhKScT1LbetdsuxQhIRVY7LMC3d7JpQG6VRiyRuc6m8n5UH\n3Eu8XqgC1hNmOr37HepXbARYKnO7BD9x42zV2RaiE1rnvGM6riSrlb+2HaB7\nY4zKO3SOGSQkWg3h1ivyvezA3fgrDnyAd9j2cDUpFELkDHS7uYbxqJxkLEL/\n3t3aSs/9xA6kVDnbEt579RjW5uzCWKHOYd6iXMo7g52sk042kPTZJTQn3NLc\nRQTK7cbFtlC8dJLfxIWkLP7Wk2NOGGTCzRiU546E4cZTOaEJ2NJGYxqyhQ8E\neKe8dkIzfNjtfbsEWd+E9hZG029+QJmEppy7SyOFlyGjhisLMdyiONOfpUIo\ncbaTef6jHHyBXa/IrDl0ajM0WTfnx1m1/g8hMokaLKpKfhQT2ANNWLyOa01T\nucRK7saH0Nv/5MBQGIZuuGp7yDNuwD5p66zki8Aed4KoSyCk54dJBs6y5tA4\n6tc6wfU240T01Lm6WPB/ZCnfnuKKlBZzuU+PS3V+YU1KL+N/nYtDMz3Y8vHy\ns1izt9BoFxeXe+FSz7r5RzPTLKkmax4Bdhn0Ia2aSa+P+rsXPjjCUDXgczcW\nGvBH\r\n=cHZk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.0.1_1595960347843_0.45159149740547955","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@module-federation/next-transpile-modules","version":"4.0.2","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.0.2","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"f44d2409cb9f921bb35761e8ea93d78ac39cf369","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.0.2.tgz","fileCount":6,"integrity":"sha512-/Ho3V/IP1nwbI0Drgh0TBla5nPII4s2eIhMjQBcuLIWRbrCPJMfUx/VLxtoFgtdXZXe4EtvnzVUi/xgvI/ys0w==","signatures":[{"sig":"MEUCIGBiOSNs9CinAwdXz+fFmTCWZqZ49/1bMDaixvVX3FCEAiEAgf5JUirczJNtgmerxX0YAwjduNtvWDL0lkPdYFdoQA8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIdNwCRA9TVsSAnZWagAA7p4P/3LeGX2gv0KpZ+b6SOuT\nt/yJQ3M5z4SoWFTBwOW9QSFcAQfFlmndZFTnE0ykAMJolskbZLdXTRJogAyD\nqsz9Zxm0vCnPqrj1Uum77OFeGmUINbxRjazGWgiUgCe6OYBeLq1MrP+VtHzQ\n0p6XTOt90sGS3mFAq+I3XW3GbWzcWZeWingeZhdIxSy885Xly+xOoW+iyvIk\n5BjMNDMsmnhmWRfQwY5OGxa80hSdl7dH+yf4xHHUgUCtvp3v3SOWgxHmKqUv\n28qdYkXeZC2H8v03EsVRBAtzk7Cy5EcxGrArKsLimrEN3nr0FlAecC8JLn9c\nntcZ665ux8nJ3L6dCP1vfZ9S3vSDFugNKJj/TccIx0TALRGNQmxtqFOwnONY\nbliC6HaK8aQUG9XqVl4DBvocqbMqhj1aXP3bs/nMiw+WQqhJFYlhtWTu6g7x\n2n0nsLIfbDN++uoOoyU96x0xxI4T7fOosCvRymYRSuSKyPI3cTizoFvoaKlD\ndA1Q9Ofrecu+EhOXtpv0AzuvKu2bCAG5wgXsp9ODlfUYib+ESeldCS/F4zeH\nvrNRlGca3cne2l4AWat9wa8b6MsEbMqtk/DU0JEvnHa/ow/KBxVKQJDCDC+V\nQ7n4BSu29bnSActBpCwclnZJfjmznbJR+25Epb9vZHkvnaG7CIISwp1fdRHN\ndkC3\r\n=F6VT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.10.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.0","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.0.2_1596052335600_0.3290203004255481","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"@module-federation/next-transpile-modules","version":"4.1.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.1.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"730cc61c62a6864782ac2346c1cfb4ea5b8ce48b","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.1.1.tgz","fileCount":6,"integrity":"sha512-GSMoZbNJ7M2NwOUKGlvvtMCHug7RNM/UTBFhxE1Aq2WDtd3AtU/v0RcD8iER1RDQ5s0jSskrBl+GIsfRkY4lWg==","signatures":[{"sig":"MEUCIGCsiUhpSrZXhoS6gAuJ3OJjJ4CnZYDktsGf48KZnAFSAiEAsroaIM7+Ub0bwF9l93dgpd93TtZeIJ8D+O8Ozh5QI1A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRAhQCRA9TVsSAnZWagAABl8P/iZAsf9naCJf+XkDkNpe\ndSjjlQhvykAA9i4HGhURTAfLEKtjm0jBcpKDzEXwhhee337oeMrRvYy5Vn/3\nVlj3MW4P8nv+X79lONJXAVSI2mEJ/xZ/QaNPUNXeKL0AJScYnXe0PMrkUBcJ\nM14fy2Dvr1hipubiJmZwbqdWYTFl5Ki7UYGLsRAUigbl4zBPVw792UrExp+n\ne6KT2HPUuWZ+adgWBKX3YrbTWFN8SrBrwNESuvNHxquB+0A2EwN+ZWv3ye88\nrHlSAUdxHhRhwYytG/IxjVTTZ1jrb1EnKnC7/9+QWxag8xJf7CL0qTNI/5z2\nB/7ZMFGPXEBmnOLCgcJkrtmZ6RJOMfKcqgOnWogulQywHPfEuLwrBsOBTwph\nrDnLjTXl2fUZi0JXQO2/RFS17WYZXIsutR/+VpKOKHZliaMCKMnXm0JZvd9H\nAzGXQpZ22FU/tpJZJTv55cKVPdfBJFVsnB6KIuGdXjIhny5Dx1nY85yoB8SS\nUsw87t2WwdMRyetfGTZaHGcnm3mTg1mcjUpy3wxe36i1pv8D0L+X75BvB9Vu\nlq8gDucIOqZSGg/aoNIfJlHyrJXB1f5yYU5bYvrtk7EsfKV90YcWrK2kqEk6\nj6Y3W1RK+mxQANUz5B+apCBNNXMjh/H+lyQ4wVSUxaRtPnrsDnHXjixr++Ec\nGxZZ\r\n=naJu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.1.1_1598294095922_0.5052775458456551","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"@module-federation/next-transpile-modules","version":"4.1.2","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.1.2","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"94e5cb55c869883d64aff13bdd0ab8f9131e7565","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.1.2.tgz","fileCount":6,"integrity":"sha512-nkWCeMCAgQuqJDPpMrV9knoMXRiLc89Hs+/5Y9uDz1nK5daUS1LS6VQyvU0ncIB+yw1D/Tj8LVh8/oXpYUWNKA==","signatures":[{"sig":"MEUCIFDA8jfISBERXaGu9y6zspKHJEcH/5CQ05XA3vmOAfO1AiEA9KyB1iQPQfWA4dNrx6nbTEH9lpB70199oUWJT7R1lZw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRpefCRA9TVsSAnZWagAA3iQQAJNivLVlax+4ioUdSdQH\ntCbo5ovQRLoMtXhbEHmF19zuyXya+QEUx4tZy1zIa+mfX/OfoVFDm7VGpwAJ\nVayc4QYv6aI0M9wMZYvULExTfW5B67c+ZsTw2NsV3GzcZHTlz1DcRx9rGOr7\nV+Yn9Uw8aPJDkJ8ksBrXc9yWqr4RM/lF/IkKKSg2U05OOYsuBihS77G5G+oA\n5YhuyPT36HSqmM7jZkVOeXOD2TnkWaDt68CPo8xQ8BBZBUcZG5Y/dRF6rCEo\nYNN//oVfWkSWM7mX9qdWrSDHBVJ8z62kv2QcBg/fP72IBfbHBWBJiiY2nvdp\nAUMHVJZklvYSgM9iCdJrJ1ZqdrJf8vagXrFyYv/ZO/L9vCi/5dYieSqaHbKC\n/ixlLypNi5V2CaHxYSEdJZIAYqCqXOh6H1ZZ0rxy5mFxLqrZuLAJGmwlyOKv\nBSA0hw3AOIQEvtKA95nlsyKLZF0DuO7U+yJKQYJ227vMu7btzQUWy/TBnNv9\nYc1B19nAFeFH1lQCqgFTALNtIb/SV6PuodRl5chEp3tG2YRd5D1BpOzMYfGm\nZIhCTuJzEkvXvlWpKr3KMMGlFHvktG2sS69xHtvllvB2zVsNmQ0lhEaPXYSJ\ntQjny04mzyvMsxafbkA+ZsLdvHidWH5ZYXfBhP6vsGjGp+ZzoXvLTfJ/h6wp\n/2eJ\r\n=z5BC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.1.2_1598461854799_0.9475035568717287","host":"s3://npm-registry-packages"}},"4.2.0-beta.0":{"name":"@module-federation/next-transpile-modules","version":"4.2.0-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.2.0-beta.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"8e10bb0a5a2dc727501465bdd7f2223b13b6dac6","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.2.0-beta.0.tgz","fileCount":6,"integrity":"sha512-MTtF9yMYYKEWN0T1frBpTQeJswSnNKHL2ngAzG+0Nx/KFmJuPWDpvtzlpWr8HEo844yVmgP/wsqbvSih8/vWfw==","signatures":[{"sig":"MEQCIAkfOoCROCdSaSoOJrTjow+jQ1IJFgyOiYfPCndBnlolAiAFlROQjPXjteYMA6cJh9nQ8fYLlvC/nUQjVuR6ysf0ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa7pZCRA9TVsSAnZWagAAQGsP/1OSceUfOQo9GoD6B7Kq\nnf8cxd4DCtRTMKDdZMfpTf+xGsaMGSZjlhxpzKeepFqY1aFkGVRSYjc14xFB\nXbyR2Bj8SXTJpSCXvMLJSg97hhDTLcAFdr49CYfi/qRtadrTfcd+qERoMoko\nqt0wjoMYLAgUE/9R5L58hPWkhzbmyQHW/f4vkkwVIky6jUGqRCVIrTxliTyg\n3LEPJfcCExiYfcMuzqZjMuM0Brp2lujxCySd9D3i3Ikrzg+id98XhBOX6hyC\nZF+JMDopvkx5QkjZDg02lvIgEygOyXBjZuLIeQkwGcIlcu+WJaArFZlnqJnw\nQ+RDxOdbiu7h1g1UZEipEqlcc1eMI1W9Sir5aZ+a6otHvcrn7fKMJbHZKVTH\ng3+yFdu/Lyye+V9Lt4abKNhv3GBUvrGjZ1GVbFEgCv2uhB3eGB1HJMNS3lrk\n/OxcTp4mZmj/zgt4gsWWWzEgso0SitzuH9wZOXPo/zWfEmHYDgV1BWHiFM1x\nCm7t+4/fzWi28lj//9KQo59a721bDi8uOa08N6y1WmovqZUp14MtG/LVssMZ\nzsJ3a1NclPyATkNRlWvMa+tDVBcOUnAgUmwqc1jztB6P3pjxiFLFuwXzAIXM\nESE5uq3l8jcKmom4KnpHV03kAnK/dcUoTbeSRar1jrI7RNpgrjpqgEDx3bV+\n6lpn\r\n=ELEW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.2**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.2.0-beta.0_1600895577153_0.8111710060236714","host":"s3://npm-registry-packages"}},"4.2.0-beta.1":{"name":"@module-federation/next-transpile-modules","version":"4.2.0-beta.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.2.0-beta.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"43a79d8e7b5b6c04cf4b9c4b1e91655ac4b166d5","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.2.0-beta.1.tgz","fileCount":6,"integrity":"sha512-ALgiLT+lwh+Vl77HnsHzkJsu56m21Byanxrim/Zfg4UN0bvxTvyeZ/WW7tLAj1eNDANObfdVZY7QC8Rr40yKHw==","signatures":[{"sig":"MEUCIAQ8j+ZhD/ZdiX9aRqDotqOS/lpuTaJdKm1SHDoewHeuAiEA3SQaRKZQYCPYVAAEdL444IVGHWwjMbgarvO0bXbow+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa73gCRA9TVsSAnZWagAAF90QAJ2ZU3Owb676T1nyHQzB\nYabBl+MoG8dBBDmnWgOT1+8hIxzdX4iPnpgy9Y3l4oxuclvGDG3pXfE7DtkS\nWpnaV2llUX0MfQy2fUK+rsdhwFY25Fb49C6h59JsfI+qlaUlfbFqXtU54GRt\ndpM9KcCbbMnN0GU1KAvdaV3dy11VB1wbs8VFVTjb5SJXmjRcC2gQ9A3XmEJ6\n0q+X5pxhGBldpuKyPodUsYQOmN8XxY1tzgyxpWzk+uCpA2jpf7B2fnNisaJm\nqqMWiSyU1K4D0H0qEHSMBve6XeeQtvmpkz4wQrucjC8V72q9uWvTVzLdtnMi\nkqY8l/7iGK00ojoTDJcyeMX6vvQBeyrn99UEsahfDefDhYQF7cC0SNn/CZdh\nAKGxOvtEeYNz5t1BuoD6S4V+dXD0Oa9aUyMgRvAspJx6wnNA5TBhlGM6U8aw\n3O4RpYDr0g9yKvPfg9ErZsBPnKU6M/7IRmOFUD+rBUQGH+BTceFNohIOywhw\nDNajU62ujWraBQl2G/QsO2PmmL1kcvKDlCaYp70W8cnFQla9HnxJ/wk27FiO\n5NVJOuEQBvj2IemHTVBts8mKv7xGkcrQSZjOU3AyiXsLGUDJhqd+ipl6fHFB\nYaUq4n1ss3yKf4OpPodl1Gr1lf7B8OFPMK1aWCeXjCgQcEsR3c9hFQ3yTitN\nv/7Z\r\n=85xv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.2**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.2.0-beta.1_1600896480419_0.685610010995106","host":"s3://npm-registry-packages"}},"4.2.0":{"name":"@module-federation/next-transpile-modules","version":"4.2.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.2.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"09a59423f66a744600d6a027958b6aac0f4ea614","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.2.0.tgz","fileCount":6,"integrity":"sha512-Cc9YwbxkP17JLx16nNVOKoyu9t4SphVEn/gVYK53WAmX+ayC0byg1CNrlcPYEufuxEB7YUHQE3Rl6D3grTfz1Q==","signatures":[{"sig":"MEUCIQC3odghGjttG7z0BD4k4wy5VRscHGooyV4wxYtnfval/wIgeo6++m2Xa2nDSGkURPwvGFPO2ftwVU8Fx/a/rqsXaXU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhJSiCRA9TVsSAnZWagAA1boP/jwp3eUMow81mKXz82di\ncOKDfK4cEe/b1LQaqJ2dMFemWNXGosbw2tRLQcQSkXxRTZSyrI5UeeJTw0bg\n6xtcKpzf3Y9oBYyM9IKJcEUTqo31MzOzXkota4GSvb58QebTdGbKCDsADDIw\nYwc1AQe34lS1HwDZzDNkDS58s7fsXZOuQaT7sM8Yw8O1nzmYSq9r9ATU+hPp\net6J5pny64qEsaTNthMMS2jgaoD+0mO5UoTr3IJOjfJF31AolOrJ16YDxGYP\n2xFr/hNglEhZ4Y22AZOYnGEFU2VkZHJZ04PpmahVeJjX+shcAmWoq5mRN9Jr\nJthnMISZAhmOESW5bPliTjmMKq1QyUcqa3QilmTJON7rULTxJ34Q8aCOHvoV\nuh/bXR6fkLc8zoImHkuvDKTnQj6IbSNyICgFRF0b2AktTrWlueGvEJxO/cVf\n6ctT1RsFuo2HdQmXv6Zod4m/9LAVbKQJeYDohPHRZlv0ydCCY8Q9KE8ns29x\nLKuKXKTyExNEjg0O0qcNDeBn9bONEbkCIel+qjI4I914iS/3eGwE0Y3XxFjl\n+jbhZMdR5+H2WdkhK80WPZJH6NomKyviz+HeOJHUZwjym2DURei/B0OYHDIG\n/QwxzGeRAXVVtXySB3GlfsOGgvupxkN22xHVZG9+lgOf1zwt2mwbpSpyyKv+\nzAHY\r\n=O+FK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.2.0_1602524321689_0.5173121303424955","host":"s3://npm-registry-packages"}},"4.2.1":{"name":"@module-federation/next-transpile-modules","version":"4.2.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.2.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"e53467d62e8c65f3bbbdf75985f6aa33ecc945c3","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.2.1.tgz","fileCount":6,"integrity":"sha512-FmvsznjxLyTh4pYW2gxeJaGO4CUb+pDWACPqUdlfFGYf1ly8kH/cvUg2IgL/LEJFPyRxdtIYUk2YMvdf2nBMrA==","signatures":[{"sig":"MEQCIDoAbvd0ARGWpo0tHScEgaO3Pq6trpGtV7+y+zI7+KZeAiAbGChlY1gFlYZnkt9QxNDh1i8pQ8fiDx9HulQ03xYRfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhdauCRA9TVsSAnZWagAAEVQP/RWs2pqyuhhIHGF6rPDT\nWcaBcIVCrpvKpKPjRDa8ZJ7Dr8yzWoGmp+HRT5HMOqB/S3j/ZWyuTR22X2aj\nwwe4gRyoBd1qso131IjaqALS6YYFDA4QZaSafqwm1LK83SitQoI9//iSvXrR\no5Nz/L9r+YlEYkrUjlGeV0xtxXXXEWvq8Q8oO7SGgq4omRBQGQ0LVbX4UDer\nyogC0B/Rud8qVX1jt1bX7jWV86wi8wxKmIwWM8kNlvea4/inWIjbaYw6NlUL\nr2qNEmHCak/UTs6ikzh5SAwVGiXpsOCup9I5dtMOiCXO1w5r0OGFc8/dJwPW\nqsWYtxolTadAk7zIdFwnCzW3NZqaONXbjYk4JGSvVjAY14wexe7UCmHA7tOM\nyMwWmMZ1RE73duOuMK7s9u3/rRIcNrr1jzDKOhVlbkVbyWAPlTt6OTk/k5hc\n6z35OmijhoQaOTE5pTVMxhzYV2dMP8cfeEgaVZSetmSKE1FEU8iDP0swEDAT\nMVlFVvqPn9KO9ia30B96YJWULTgUAAZDDWwlfl8jP0wVT3EmTQU862Qv6CIV\nNH7c1/sat4Tu/RqePUB6mmIgyWoK22xxiTbo3UMgbtx51Co9NBU7eHlf0rf/\nHPh4qGphIK9RHFl2R+rRJhmoJbN5Ag9Zae32pfd+2yTX2CIpEukJhBBLXOf2\n/YN4\r\n=TE1v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest","test:lint":"eslint .","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5","test:formatting":"prettier --check \"**/*.js\"","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"slash":"^3.0.0","micromatch":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","rewire":"4.0.1","webpack":"^4.44.0","anymatch":"2.0.0","prettier":"1.19.1","puppeteer":"5.2.1","jest-puppeteer":"^4.4.0","prettier-eslint":"9.0.1","eslint-plugin-jest":"23.20.0","eslint-plugin-node":"11.1.0","eslint-plugin-import":"2.22.0","eslint-plugin-promise":"4.2.1","eslint-config-prettier":"6.11.0","eslint-plugin-standard":"4.0.1","eslint-config-semistandard":"15.0.1","jest-environment-puppeteer":"4.4.0","@types/jest-environment-puppeteer":"4.3.2"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.2.1_1602606766148_0.7718565047673165","host":"s3://npm-registry-packages"}},"4.3.0-beta.0":{"name":"@module-federation/next-transpile-modules","version":"4.3.0-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.3.0-beta.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"5ef0ffa1e0077f416c29c885f8eab6eeb7a6f368","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.3.0-beta.0.tgz","fileCount":18,"integrity":"sha512-SjJ0fypcn0Cp5KYnA2OgKoNhvDAmeJgH7hS9ALOVYdXFKNGbF4r6RCPo91Mv8jcwgiNU9pCo9PGYR/v5q1lFKA==","signatures":[{"sig":"MEUCID69OCQIkGXDLxMH6bBvdGdc6HdxcUn947YkmxNRXYuYAiEAl3J9kRzbo+pIaA+bZRBcCF8x0D/cLe8sLF/TIfPwKWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrcUvCRA9TVsSAnZWagAA6RkP+wR0YKUudwIzExxn0Mvt\na8qwuey9SmcOm7+Cn9EGAIfbikGocC5LjfF3cZ/hdTcFLUR1N9yc8xAsDiLZ\ngw23q3g8zZXfgxYOMqGnGXvST2iq75W28dGFMPO/80+S+NatajpyJS2kspdP\nhnhjwXFkTAhQb3ciClCI2jNn8+RTIBMcFJTnLpg7llN/ywwZ4O21ychao/ml\nVX7J6t0gz6I3jzpKk8MsZZnLHIJCWAclNjxVeM5xoJxVZPvCn4W2RSPAyLT9\nkG6XXUwPiNVnlmXmdtYTzbUGTfhsCSKsa93/pJhzyQ0icjssLqqVv8/pLvki\n/2W63s97Ll6wIOix5G1APqXQCzjp+KTbl6XlL2v+P6CBxuiwjBWiC2yfKrR9\n9urwaS9JpvwWKV4rdHAkHgDbEFBhq79e+C32U1FabwKrbgM78MUWWrVtuJU4\nHIzfqB2JdQMro5hKpZsljoWE6MyJ1naqsPT7x3Gd/5qvdODymzb996MlClwJ\nnsC+QmQ2Hylk+v2jEpk7tFg0YPzTVCd/IyZPWaHriujJrngxJj6/jYxthQLu\neEocNBW1jm+LLq0+oF4n6TbkwoKtpwsDNoxtLyoZzRRm0mLG5keY3ZvNqDrN\niPqbqWdw5xxyJEi5qnsOTXFCpsAokWHp2Uy9b83m3An6uxKS/BByqxGfZiCU\nGAkN\r\n=TKwA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"resolve":"^1.19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.3.0-beta.0_1605223727477_0.09509259186530006","host":"s3://npm-registry-packages"}},"3.4.0-beta.1":{"name":"@module-federation/next-transpile-modules","version":"3.4.0-beta.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@3.4.0-beta.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"d118a9129a63be7f7e58a0d9a19d8dee35acfcd2","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-3.4.0-beta.1.tgz","fileCount":18,"integrity":"sha512-Po2yMCpcOBkuzi7t1J7B/RQ9+9xcfQYG7WwuOj6HheH01tF07pjubUtS8EW+g1QmePbw8pBMQx3IBZh8+kd3Uw==","signatures":[{"sig":"MEQCIFnC4kQezMUmgl+HBpBsfd1+945Ih7Hy/LaBpQBnE0rpAiBgAiqoJZzGfthVIbzBjvOG6FUr+mySPXdAb6UP/TMcXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrceyCRA9TVsSAnZWagAAUEMP/3yvd+vXTTz8qe8NhPsN\nxTxPW9jcjsyH/pZWX56MNEkFou2CYPIAe+D0cpfuU9px94M5oaVRBC5xZkCk\n/7SkJwQt1byf57TG88dlM/53CBVn8IUi9e7XKQQc4UbD1LEbBaSlotEE0l/2\n/8DPh06wGsUVXXJ/ZdQvh3u8/6lCcKQZwnWC3su+3T+1WOdP7x+TiC1qOSd4\n6TOpwYtenlT4itGP+gKir/9/JQKdfHpX6Jc1Bpwiosfk8fXRAcX1YAMpslRP\nrMQPpk3YfHfxjLokM5oJeU4SySbF6nMECjYNsK+TxCFZ5BK7JgiHElRopF9U\nWzbJ/n4/391G8pOtzaretg+KbB44zVh/hhko/3gaEPsyYS5r1MeOk06Y/aQE\np/xOFHl2hyvdiXjCKd/A9N1JosGi9ITvcl3G6IvqRAJmjQXlA8a7XdkegDW+\niXPUFVmyJ/DgHfw/50YytmsEdFDUZpGbCGE1tXaxVBeT4VGIec2HR49XCB9o\nJKSrqj5XwGGSRsRVzkyoPP9J3pzdKX+NRQMCgVGfouvIBoqx1kQz6p9VlG4i\nIMHTxI+Fp0Zj6HaNVPEnJ9qJjGgOhnU4Mkp9ftLtq0QOzh+rW8a5MvTpNA3W\ns9+Mvx3kVkLoVjQgbRVp05R/YTygNA6P4p1NJbwcFI0nUB716QBCg1lfIdLn\nzJPB\r\n=oXbt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"resolve":"^1.19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_3.4.0-beta.1_1605224369810_0.9838322101130215","host":"s3://npm-registry-packages"}},"4.3.0-beta.1":{"name":"@module-federation/next-transpile-modules","version":"4.3.0-beta.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.3.0-beta.1","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"295cb3aa2e8dbe750721028e0261276d425d843e","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.3.0-beta.1.tgz","fileCount":18,"integrity":"sha512-MPHoAHNGikJx2J8NA0tvMCv/9lTIyF/WIAloSFTShQT6rROqOw2SWlOB1GwnP1+TODBQpx1uz1tZ4DkUPD0nng==","signatures":[{"sig":"MEQCIBdCMrS2g6c6BZMtDiIdrz7f7W3KdAncfT9ov3nnkt3KAiBSOjkGnxhzNB5ovSm4BLU8MdAH5ZYLrQxHt8Aim8E99Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrce/CRA9TVsSAnZWagAAs7gP/0FI1vd7VdbEndsjVQYO\noEMfqOWX6mHb9/b0QEWwIneVaSHDPn3PgL5jAdLWnPThWxZYe8t1ADxDacet\nZM1bM6Hs+pjUMwVo2ZYQiIjgcb+7PtXfFpD2QpRcsP2DT1OQfS7j9H4DBS99\nr8LkoxuokJ2Z4AjQ5jchDokVbT5AcUAo42FLQDDOcK7xrXcN+nBKR9CEARYG\nQR6B3T/im+If+q1gyS+5EAqfZKL1a7nf5LFAw5HKFY8lYT8+rTHFtHIrI0Qk\nIR0MVyqaj8eTcy2K6PEq1EHOVj82YFFuzljo28Y3LpIGxn1vjsz8T/cwHjuu\nJiumKbTaAgRgHpg2k7cW3xu1JN/bLw1kgJk1WbeQLXk1k05ePPmzP2fyxbGF\nmyiBXY9h2oy7k+R3dSgRla5GrZlUVZugbMjfBJKK6whiES03Fmsu2KyGy4du\n6jVSh/wGhI/2yH9GynNm2DwV+A5HkktL4kK/EnDsP+DTCeQ9Eorvr0ovvkYx\nkL8KrJwpnjSy4NwoWvmIN5xH+ql40oh5GENvUqL8uX/MPvfW/2DSj1/Z3ctF\n0ZwT8/T6ovmlfZxgMxaB/ljkn5SHDaax1Teh1sJ0xxr6d6D+UzuvFrp4Fgwp\ndUDOzOaK7qMAfYWTXYzarH0somNZDnZMHwmlSXp4dKMwGnYABLDRmkElWZg5\nce/7\r\n=FE2U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"resolve":"^1.19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.3.0-beta.1_1605224383359_0.1532546820514462","host":"s3://npm-registry-packages"}},"4.3.0-beta.2":{"name":"@module-federation/next-transpile-modules","version":"4.3.0-beta.2","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.3.0-beta.2","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"9fdd5ceaa751ee6889c4545122577dae25e3e3fd","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.3.0-beta.2.tgz","fileCount":18,"integrity":"sha512-aaGnxqpKKcs6ypvfZwRJL3QQcmzyv9nku3dxUAjwaFxE7CKm4S28I79afUSbgrmTI9Ewq/2mqac6EHQzFlpsXg==","signatures":[{"sig":"MEUCICTJMGOQOS2Uax6BCFTDu1GGCL6AR8lAyFaIjp7h+41uAiEAyZTyedp1Cxomw7eWdOtW+Nw3CRN1bUJ+jTofoB9ZltA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrcjGCRA9TVsSAnZWagAAbdQP/ifEGjef4eEuDtc14Scs\nXVtdNCK4yrUqLxPCejaExuB6Adcf73ob/zKerPheku9kd4jRv0o2ST8vFsUb\nXIB9DblYRqJndM1vKjoI2yX0vmdYDy5tzJ4Nl9Nlg77LsvtVLTw5qyoqlkz8\nHRc/NVZA/OGdPOnJcICLE7pVu5vGSXh+hnYbYmPpw8cuuNC2E/M3yg2eOs/S\nIuh8e7YOC8YVY1ZEI6BFU8NMYPVh5ssp9BAlHrLLsT+9hB7ztZclFGFxBCAB\n2vmrkrTkHnQP7WB9MUE96yGaDNoszyiYthWRG29/5iCTQG+nGypTJKu3ovjd\ng4EM/89MfB9mb7AweLUIQFNytKAsATVKE+6ObyaGiRZxWrHhSOIvJ6WnJvfJ\n8BuiD8waKUuZ7dEg/0TTzh7qT0Kby/bCCpUnyYwCsKgxAsr8O0nq/h5SPz0z\npbtcdxqlZiQIZf9g4vwjru/uxO98vIx1ivjHv/wvd31Jgmkx8m50GDQwbY8F\nyqslMsymyKVIUYq5r4v22hMkuJj+PKXFu87AAVMJkea195k4RIOW1Tatw0g0\nHUzOfyZBGHx1BW8kJTSbizqMWdp52Sz58cGr7tiN/g8miC3FzIMu7lD7gYDG\nW8uopXMHI/sfizuJcJddCRbZcCRsfIjpdLbnaxrBQMbivSfkpBqX5yvi+hHn\nnz1O\r\n=VtkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"resolve":"^1.19.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.3.0-beta.2_1605224645583_0.14899862856075252","host":"s3://npm-registry-packages"}},"4.5.0-beta.0":{"name":"@module-federation/next-transpile-modules","version":"4.5.0-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@4.5.0-beta.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"df3f8e45cdc1e8d18ebf68e31344d59bc992e0c5","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-4.5.0-beta.0.tgz","fileCount":18,"integrity":"sha512-jNFg9hHl8fxahroAWU7m5IgtO3mY69+tIYoKBUYj+Yf2biGtUxLu8zs2CNSLDtbDKiqIFiavhXKORfFmlKguyg==","signatures":[{"sig":"MEUCIQC3FfpYGFVFhfndcnuO7djOL5AS6KcL8s1GU/AbB7F5KAIgLj/kCy/ZwsIjaN9trN5+0yPnI1lx8ob3xXBK4vy3KAM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrfm4CRA9TVsSAnZWagAAiXoP/j0fzkVQ4ILBW4IGwl1i\nhGMsPC3KRdT8blffmmnelNIW6yUIbX6dHyhxzl1QPgO4LjqTAs7Z96EQpPis\n0v87Me1G4bE+G+5ZdGX2rzUtGLDcyzNLtHo2AXZ/F9WANAl3qqZKbsdu5mDi\nmFxSjBTH7jJXcnX3zl18efweWElorVbPDjvEyZKmns5OK8OJt2f7M/A8mQLh\na9/kBleql8rZ1IAXgk3qaDcUrR3n8iEGVY6CxvUo2T2vLMDG4LKmjJycw2tg\n9LRZ1y2hgWmvzvzDU/OGweQJrAdsOWl25aHKE/q+OPQUKe9dizAyJetvOiLd\nY0dno1bcNqV/PhWjaYiz6D/wKmZkf1dk1BDqB0bqntfDd8fRu2uXibxD+fER\nhRIDw9XZvTPgtU69AraRHoBi9vrBY40VEjRRvZDbF9C/mATvyVbs7AZNE9JT\nnN6uGGcIZcUhKX9OnrRwj/sn69/4EKx3RYewzUKxkiBOzmWqjn5a46Rq1mml\niDVDGhTgfjGOFY97ibOSkrKn4kxVRbVxbmA+fL4GRIPqbs9D9fqpJV558xWo\nduwClOw6hndbAceO9Z7DZCAOmR/ixPkOJ6ue7ptljRCpIxApErelTU5/XyFc\nU5pKV4j11JmybxQDLAnXd2z4CEHuxh/DwMkSbF9GAy/pkjZIXlg/OXavJud1\nyjwf\r\n=bE4A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"resolve":"^1.19.0","glob-to-regexp":"^0.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_4.5.0-beta.0_1605237175896_0.043506270118963686","host":"s3://npm-registry-packages"}},"5.0.0-beta.6":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.6","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.6","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"6f9bc6353d7276c00de8a31c865c831305199189","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.6.tgz","fileCount":18,"integrity":"sha512-XSpdprYMVNCI7l7f2o36XoAP1OwojQmFcpfNFRRr8KhVGvVGzS/pixgia8MYlIFkj4XXQjCJLZe0ayU6DJMXtw==","signatures":[{"sig":"MEUCIE4XVirh+hWUJMliMCGRDpD5SSAHqjT2DxJt7neT/YjiAiEAiT/vhsqduJzQrcinB/6zOETpU4nXP7cyjdyoOjk4QZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrv/uCRA9TVsSAnZWagAAzr0P/j2FfpjxBqZGxXWafFi+\n/9ZJOmB4RWJh8cLUEsIJImHV7XQJOmw1jO5l1VUMm14xUkVz0hamIK6RqtY0\n8COnFXfspI9WDR+sJDfMijua/sWYFrrH7C1Iisf7EkuOttrym0onFUo7LtnR\ni8I06ioAxIGtIcFstI6VD8Iya7fm22BlKo57nRAJlpv88apzPQqumM7E64+D\nBFv0RBXpbz+/w7afrBF1LtvGHzaou0nd5yDVGvHxSp3kq+uWd2KHsxBxmywc\npj9FG8sZYGxpnW0bT3A0AXbvt58AQ6dhFbpOU11YHPycvmn9woO7WYXTHia4\nfMAHM+sZyS0N0c7DHiJjMKDztAtAcsJz1O5ZP/QPkyFImb5neeC04Td1dWZ0\nmb+7RnpR3UXdnsMdcLRojguqFQ7B+T6pNK/h+hnI9a+u6trYqvfhMkaxEPv4\n+qdwfQ2cqW5fqLsC1UQksdBq/JQtS8RTMqTTkaZgDJl0cX6i6pTVRcs4vEBZ\nPaPnY19xGYkIeADclf6lAO62T0Yy7d55lqzJnNyhUpKEcLYnqt8ZJDwaLa9m\nY1c1VzTd9HRU+euf7QG7S79n8d2BOJOk8jqqFjdqWQJ0opthOV6GMEoR4y/E\nw0VdRXxCg276jEPrJz/cy5BeelfqjSDqmA1bV5KFEZb3YF59C8PG/+knNArV\nMwPZ\r\n=5G1A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x            |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","enhanced-resolve":"^5.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.6_1605304302455_0.158415867163614","host":"s3://npm-registry-packages"}},"5.0.0-beta.7":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.7","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.7","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"c5939f4006ff7e0e9cfed5f3e3c4f2379abf340a","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.7.tgz","fileCount":18,"integrity":"sha512-ZMsMG9AyVu5O5DjEu0J+OYMuvS7HixUG7fl+sMcaDmwptcCHA5CyBDj6o/lyu3icfxJnnbVCzelBG/69Mo1p6Q==","signatures":[{"sig":"MEUCIF5wDT8tkLRubC5PR1v69ojpmL+SWOwRl+V6vrTEt1NxAiEAge4xANJOu3dGqZRfRifnqvTUNSrIhoP/lEqWF3eR7HE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftKYnCRA9TVsSAnZWagAA5gQQAIgEwh9ibjiiV6VJSX9/\nAMl7DZQabjWdNSmA4mkIm6oK+W9yQtnXm3y2XGk8KhiqBw24eCyJQ2qtm+nB\nzayyubQjd4snI1/n3mX5Hp7CFeA9WM6oscN2OehJ4MaJjvCuT8m3fKe2L47M\n7b1dUtlj5cDQKXZ6RjJt0XUtFo4mFqPvXsiBnSIgsfVOQhFO0ch4V4KtwRk4\n9mOSINajIfP/Sbg1BmGQmXQ8xaQk+x1t0225XRVgcO6o6Za/G/nMRcfPyDt4\n/6FKqPCw19P2MN0c9Otg+HfQer1X9OBbqkeKYenfRbJ1/QV/oud8m/9SKcfZ\nPOFzzhe9CoI8MUl3X7teUluYOm3nsQArcGQbHA8nyGIVcGRMIXhvwbf4rwvy\ngxh9U9kD55RWaF5P88jVb2UViH2k/JLIfRdyMv5FQQva5H194PR4V8NcrmYM\nMnvh/EQXzi8hQhd3Nx27W+JmXgJb4Ci4MobASpnDZWlZ8RWii5zDrTSI2wN2\nQy0HH524m+aa4zfqKARqTApLWIFloZl7WMW6o4jFcZ86x2hpV9umY/aXYk+Y\n3LQV9ALmVMf4j2X3Xh5BDg/Ay10/Uzi1BUbQ8L+dDyUYXfNEhd1Dli0uIbwn\nmyohin/+NFBawNcCMCAnPj1QXtMWr0v3swepD2b4AUhEWOQInZU5ifZTEp0N\nO2J1\r\n=yGw+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.7_1605674535100_0.8384815074448493","host":"s3://npm-registry-packages"}},"5.0.0-beta.8":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.8","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.8","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"7c897798b7c605a40eea0f640d778174ad83bb82","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.8.tgz","fileCount":18,"integrity":"sha512-UMGXKlHNELpLpGOVkeQmAmLNxWgl1B0LPR9kJPAsYi5XKB/v5A8u4pzGb3ti4dbeAhl1Y8ByzWZxVds8edDRhg==","signatures":[{"sig":"MEYCIQDOJzTzLVHTq+EXdMOgZxwPXBJQVmYaDYI0MheaI51lWQIhAIUaRBSeKVIzScwMTc3bFwnGxu4evPBCytub4SUGaOzC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftLIKCRA9TVsSAnZWagAA0g8P/1HrkVBNWAfSjsq4j4yP\nkEiAbbLnJYd5MNfRpbSENjI3ySp8iJAriwvaIV97WGtFJcE6klVAk+7wGDcl\nkjW/PZ/KV9bWBAUDYxbMTIkrXO1n0y+zLaYS9qFu5/1qRTEcaiINNfdNWUn8\n2xfh1XbswDNXQvWDOwksEtzfsVBiOxbvw3Si5DyuUMZq06b+9pHObaV7pqjm\nW99hLif28+CPyyOp2uFaih5iDyrb61wDSim0GNEWwwKGI3LlygcVbb3BqZxw\nAVfZFdoA8OvsPJQYZ6KZRiDYp0mDtLJ6NPhrLSD1kgFrm6Y5zm76wj1IcDXS\nRfFC5VQSo6m9WbV1CxyUYp/S+QOgBwrF9z6NonTYnSFe0BH552VFb/ay2Vk/\nHM1VRLeBKViGH99TNEH0u+cYt5PqePrEq6ppm8XhpUNcVHNMTeq8CUPTqlbc\nOP5TVt8sAp5kvgzj9gZ7Mheff9T36vtM8wwDoSWmHajYtdG2RhKCY4NcKrnt\nsWlYcA0oTwfZ7SnUmd/d5aiQ1Gza0H4vJRRKo452hYieX9MiXKtrcQlnB6bU\nv0+5HEPIHjdGwoNPyjprcta3bf2Q3PnwgBLLVHGtKlc54Fpcs1aa/5Ug9VPt\nUuO4fgK5XJV8TsYLipq0ydseHWXPd6iSkDD3iPeh2PWXdKGoPJc9o9FuNzpi\nCQ/+\r\n=3We2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.8_1605677578018_0.7155610035134825","host":"s3://npm-registry-packages"}},"5.0.0-beta.9":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.9","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.9","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"0d14dd324332387623806432b0fbc3f80f14e116","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.9.tgz","fileCount":18,"integrity":"sha512-y4dX0CR3xENqKateKf8+OBmbvPBU6VPf3YmFkPt2vXfOdQ6FuYrIDrgbShLVJr7B1EtuNx89wcjHCPw6Wryavg==","signatures":[{"sig":"MEUCIHFOLPtL6o7bPzdfFZ7fuoUzu06pMvUAJgVq6SgyvX67AiEAk3b/EFCsHAoQCOvXZvZiieRDqzpDOQ1w9zMIM72SUWo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftLeACRA9TVsSAnZWagAAy3oP/j8tlUUBAsHaW5wC8Xf0\nnlLfanj+qtmpi/Vh4rSs8LXkBB7G/vub8p/Lm3BXGCtDNaavneOHGN95zu2a\nsTyLqmBVV5YphVr9C5d+7RFZFNDjisLNzhfi7I+L/mpv7zrKgfwb85ScDOc6\ndHz24c7nzOD8ABnmoRz0AToONu5F6oacBb+EVYAFbqL9B0Ue8CqLgSOS+ldn\nxVWAJ38zZaYkn4Rrze++zYq3hn97lMe+AvPN3BiBmxXjDayafxA0hDI64CWc\nxxhrmUCWPNFxchqQM99IHm2lp7aauRFcOKvnGSbKEm5gkkRMpK1Xz240i5XK\nLpKya34sKzxxdoFqrgaaYYLYU2g6jcwQnIgbou4tVfJuif2azyjwJCcl0FE4\nM9eVkQlcJkuxLGv98jWGjx9JLZSEVoov9s83Dcm/eZnZB+aLIUUkd8eHHxI+\nO4zEgE/QetE8DYXYhVNYJpVetAZyhAdPvS/zny48JG4lUU2fJYVvliMzzkih\nohYz40Efuiehox/3eS4a4BtRA1VO5PYudqw1WWLFO4QArRnRem8smEgMlPiu\nx/zXZmIgcu0xBzVsJdkQo5/qhH5AjcEuBQsjlJtYlXD64N6YybiNaK13Nfqr\nHZo7pjwQaeqH9LHhcFby8n84u8bbun0C8Jz5wj7B9ryYnHLGZUavvBuAIyI4\njjmC\r\n=JFbM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.9_1605678976421_0.22068916397854066","host":"s3://npm-registry-packages"}},"5.0.0-beta.10":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.10","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.10","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"1809f66861f471904dfaa0e5a92dc74731611239","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.10.tgz","fileCount":18,"integrity":"sha512-2MB0rpEFLjqVH5dap8Tk45BdKjpHmNuXIuzVMltebOVYw3s4v1GOE6l8YJ8dkuHnhxYTHbRYsP+vflVwKvCMCQ==","signatures":[{"sig":"MEQCIAt2UAGB9wDH6+A44xDxsmoSPEFPNWAuV8+1qjHm0RPzAiA5kdpyEgtqBCSvjJHFEoHd4zth/tcRXiQAlETlx612vQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftLilCRA9TVsSAnZWagAAHWIP/07u4L4WC+no09BOrZrM\nRIH2mWBxZned7MiTy3dEDHa0u4H7vVJ0z+DysyFDRXDdrR05GAtRwihHkfNz\nw48uj/sKQ6pdvo1tTJVBjOvlSw4wrhCeAPYiEUw9AEAo5MNregfgMVwup4BJ\nsVzbXyRAkJ6acF+yqw2++IbXUL0KPoWvXPW+ZWZcK5m8rQOi6jscP4Yjruom\np5qI336A2kW0BAfvJVeoAkXzwl6zgSaJ8PmLuWJcZrXbst3wP1+58lnhJ2qK\nG473gj2cfK9/dmIFrqzgH7K/s46mlfmVy/Pg9mK9HTvZqtHifFcWAGgRN/+J\nwTW8K8LgyhJppCBfN7pL2cEgLZl6agsOKO6PzTM7w8c9RYGtB7CFq+AwH5JM\nylVSjt0Zo6Q3tGRDkO6cYV0veaGbtCgVXCoYP3s9ZhtWr+SEaKx7+zBK/1HN\nlU7epfqfiL2ka/d2TEBE1bd2Cj+p7eTpDBm6SI5GnKhYcrvPOfGdBI8rTqvV\nwB3vsw16Wtpuiouqtj43d3vVyuljBo+DPhFqQolLz0/C915mgMfAepZsbuW/\nPoS/2nRBUQ1XxuXNnvgOek8atz/brfzt5iUKn/CbpqbcSLLIuUbwZ4nthB8z\nqjLp2OXCOlXeP8ZLMtj8wKaxm8KUrv+ZoKDcI5LOmkIDtIsFkA1tNcAwF+eI\nPZNQ\r\n=a5IK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5 run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.10_1605679269299_0.2167477096712802","host":"s3://npm-registry-packages"}},"5.0.0-beta.11":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.11","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.11","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"7cd079194e043c9fb8e9d5989f41860a0f1695bf","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.11.tgz","fileCount":15,"integrity":"sha512-S4mP9EvcyloAW+pnXax0/kwu2RCjsh4i+mMlJRBoo2Qtc9Zybzq3j0ZAGrDothfGzI9HJH4eP4AGvvwc4kxDwA==","signatures":[{"sig":"MEUCIQCKYGpQ0TGtzWT7xcqvWli0VCLAMn06tFnhZvM/yX2HgwIgb+uNVWWKV3cP3V96+iLthFvwj7zD6onIjZSI1qopbqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuEDKCRA9TVsSAnZWagAAlhMP/1DDACjKfVBOINOi6Xgo\nNH+8kY4tZBpq5+R2Dntfy2vEH5ZIkWo1YjU0BYZLgCZjaq3INbOsMl8IPSv0\neeISMlfiy9pGLL101aQIAUt3Hl9iiXSvPO/a96B48OExz+xH2t9K8lOKXDw9\ncZjP05U/0xViY3tRI7+dnpIzU4xIo3wLpMIHSOoXpK2fSX3KEZ7L3CmRX5Sh\npPYHOeSszLFOjSH9WBCeqYw90RgnD3sHBPXTpgxBpEsjtZIpzjQtIZ4q8M6w\nc9W67PBURrSbNL1WsT8xkNK012Zu7vVBNfBDz6esXRP4I9tfzZBEfQXPq8k3\nVZNtiWAa3YCfEzwB6OZptzwP1/+nX3Pz5ygCiYdGFLeDPnQTvdmaPIKrPWhK\niE9lAoUgiCpLq3o8za2+GbpWAP6Qi4ZNYU3vnnpJrE/Yssmh7M4nhnNosvbM\nEabZ4GgmBp2Mo6/j9FTBv60US/aAfTUMbxZJ/Ow2gQHV5hJB3e7DBve0e5n+\n1KlkNN9ZSDwfbEGI/P3NoIXb9Kh6nrhqea8XPjY+jmPkwjthp8gzwUjP6Pvn\nGGfPOzjF4mgTgUrqKtB6GSi88pEGI0TUVgjAw/L/M5jbhd145aO1vybBx8J2\np04Uw0TTDOZqD0FLeMN+zWRnR+c7h5SVgDyxbiIodiJawE2ulhlHdQashN2/\npfmh\r\n=YELE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.11_1605910730148_0.15814964489456407","host":"s3://npm-registry-packages"}},"5.0.0-beta.12":{"name":"@module-federation/next-transpile-modules","version":"5.0.0-beta.12","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@5.0.0-beta.12","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"951eaa14129651ef90d313a714f88a99c732e685","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-5.0.0-beta.12.tgz","fileCount":15,"integrity":"sha512-8H1mz+VIlUMgiIBXwKQQXavzHqdNuv6umFzWZBKlvkspPK9+NRKRm4Bqvjj7qt8aiyEtNYm0AW9ADJd3GyOItA==","signatures":[{"sig":"MEQCIA/Du9JJSKNI4VVpCU9HOC4Sy/r2auNI4X27fHCh07gWAiB0tc+0WZaL9MOU7J/tPB+gqeNcP2BR2ro5ncNMoPYTnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvBevCRA9TVsSAnZWagAAAPUP/3iNePiPfQYxJTPc6sBp\nmfDX85qyp1h1ePm4BYvttg4rvBK15MFdUt8imJ3eMGxfG84mSmQnSj1jLKol\ndKOqel8SGBbtmB2ih6HFVCXOvmNZg5k7lwFT5PpWxqLxm2ZqAsClRzG6jQEq\nXg8mNNOhlJoNulJIKuhPQeZ5gkx1gMiReME9rwRgzdy8SkMJUHQPsz8MyVuj\nbLokrMvyAzQWds8oul3BKVO8Fo9bwyCp21fIeqnq7ViIolwYs51HVt/akzmh\n+AISCce2OZJ98bBBSzuiBzk07yoRSHhO9iLjqxFkVda+Jyx1+sTqoyxiEjA6\n8jBZBEFgxVDqN2HfQAr0/YnZMLKR93tbksFXDwPh7oYmfbyss4H1Ag+a8XGK\neAXfX4+szTJ/eQWrOQ+iiimZoUhl1GFTmAYjZ0DkHMEyw1pyU8kub411tMTA\nxamWc0XR5jEWa/ozb5s/oguBpiu5ycZoWOhUWo4TggCJ9pEpvSGW4cAVnr3N\n3XI9VntY0QinEFHcfHx2NABZvmk/mBSj5VsNcZnV72tb8PakAr8/L9DnwrwR\nw2xGYi4iqwLlPcVHsgnughpyY6P92oFH7VyWXI4rLAATLWffhoDrZH6GlMg+\nOzW4j3Zzl6WnelzAoobeVh0/3LcFaXQJdfWoNpFykL0u5VZQ4Tz4rgsQ7x8D\n3nBQ\r\n=2JvZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile untranspiled modules from `node_modules` using the Next.js Babel configuration.\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version | Plugin version |\n| --------------- | -------------- |\n| Next.js 9.5+    | 4.x            |\n| Next.js 9.2     | 3.x            |\n| Next.js 8 / 9   | 2.x            |\n| Next.js 6 / 7   | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**note:** please declare `withTM` as your last plugin (the \"most nested\" one).\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.1","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.12.1","rewire":"^4.0.1","webpack":"^4.44.0","anymatch":"^2.0.0","fs-extra":"^9.0.1","prettier":"^2.1.2","puppeteer":"^5.4.1","jest-puppeteer":"^4.4.0","prettier-eslint":"^11.0.0","eslint-plugin-jest":"^24.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^4.0.2","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_5.0.0-beta.12_1606162350409_0.43759512601607553","host":"s3://npm-registry-packages"}},"6.0.0-beta.0":{"name":"@module-federation/next-transpile-modules","version":"6.0.0-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.0.0-beta.0","maintainers":[{"name":"marais","email":"me@maraisr.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"4aa1532e1c7360663134713a40989aedfbbb547a","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.0.0-beta.0.tgz","fileCount":15,"integrity":"sha512-7suucFdOFod02kYJ7s1Ti9jPmVPGO/OVROb0wymk0jmT9EQPmAD/yVLYg+/zLYENC2OTL+mm491Sa4qaykk76w==","signatures":[{"sig":"MEYCIQDp1Vjc5zABYZn/rouvwWrX0DatUikuQS/EWZM5VRqXtQIhAJvm/P7YeJ8B4wCONqbpl1p+r4tDBfSSiDs1afbTVRSo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzq9eCRA9TVsSAnZWagAAKIoP/jHVU5/0ApIDmpHWzqjH\nRmzwdtYY9TYbzLhjrFcaCca1YtXwsae43ZBD1jNed+KxS7suijuEv8JNf2V/\ntjuX4FrkzOg3zNlu2+6KJY99M+s0dJHfiN1oV6Us/iBPIIVOVgeavkaWx5va\ngJ5sxB6KaV7NxuRW7hPdbyWfEPNQRTNnhscin9E7ezbt5Tv2MAwhGgRxKdWQ\nnx6ZteKD9LNZe/fvJEZ1T34w7g0aKgmtdaB0Q+4ar+sfGji3hsgWLg70i4QC\nLdKPWzDVKco9N9G61w+EJhCpvRyagPCRF3HWIY4nUJ6sBPG36QXauuntVyRC\ndVZkrdH15iWBHa3rXPpANKTV/tGenJP6L+RbNTb76lHcgmMJYbYV9xaTjeVf\neuDcOXnJHdPty+O45gHxHzCePHdihr0G9fmxy3ZRV+Y9if1iLDpmzIGEhUgp\n1uqbdnO/UbaGuK/nuPUodvbrDXIdc8hkTF90E10XKpllr86r1GBIG/63hjkj\nTor3TrMlFp0uzGSDSfIxXgo6g524nQteE4Z6k+5raoU4iyYJ504Zi/xWkruG\nu72Iq2Tx4TX6Jiab4elqYHtep6olKHA1Xz8Vea/LeAmBe1Kt2Ocozdf6Vnar\nAjFMexw1t5cB/QScA/bcww3hguYXqmWgwDooxciMsE1EKwXPln1fsEj2wA3a\nkGOH\r\n=qOB5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x  |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **10.0.0**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work with v5\n\nPlease make sure to [read the changelog](https://github.com/martpie/next-transpile-modules/releases).\n\n### I have trouble making it work with Next.js 7\n\nNext.js 7 introduced Webpack 4 and Babel 7, [which changed a couple of things](https://github.com/zeit/next.js/issues/5393#issuecomment-458517433), especially for TypeScript and Flow plugins.\n\nIf you have a transpilation error when loading a page, check that your `babel.config.js` is up to date and valid, [you may have forgotten a preset](https://github.com/martpie/next-transpile-modules/issues/1#issuecomment-427749256) there.\n\n### I have trouble with transpilation and Flow/TypeScript\n\nIn your Next.js app, make sure you use a `babel.config.js` and not a `.babelrc` as Babel's configuration file (see explanation below).\n\n**Since Next.js 9, you probably don't need that file anymore**, as TypeScript is supported natively.\n\n### I have trouble with transpilation and Yarn workspaces\n\nIf you get a transpilation error when using Yarn workspaces, make sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and won't work as Yarn install dependencies in a parent directory).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nMake sure you are using a `babel.config.js` and not a `.babelrc`. The former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only.\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, in caps).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"pkg-up":"^3.1.0","pkg-dir":"^5.0.0","symlinked":"^0.5.0","enhanced-resolve":"^5.3.2","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.14.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.0.1","prettier":"^2.2.0","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.0.0-beta.0_1607380830236_0.9019653548378028","host":"s3://npm-registry-packages"}},"6.0.0-beta.1":{"name":"@module-federation/next-transpile-modules","version":"6.0.0-beta.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.0.0-beta.1","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"bef963706912738aac5227c205a1976180377713","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.0.0-beta.1.tgz","fileCount":15,"integrity":"sha512-zxeBMDbH9L4kV9+kKFRn93NhsdEkrSNJgujIUvP3NMaqoHMkdk4CXgvR6WGJ2e2jf7FhELe3FCM6nFYSS1lV/A==","signatures":[{"sig":"MEUCIQDRRaiQIJy59dAAKqL/6HMJkshiAFL1Rsyq3Qzb6FynSQIgcGldcPm6fJgfmjVnakbf+4H7roXkSgS084xP2SJ5UlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6kQBCRA9TVsSAnZWagAAdyYP/3TXtepI0o6amL7CsZeq\n9GXXUBkInYrv+ogUV+QAC/lwZK3pqb7OREz3ZMgx3gJggYxNCyNRiuthLQ58\nkXHLqwcPgLBYZvxNL3UqdbpPgGE5hFG/8Arjz9bfQKwr0M5E9pXqQLgRGEmG\n3NrspEkkTsokWrJRBB4/EL1lKJZ/wl1//29tpAThSsc6smcIPbCJs5HEkdyl\nEej9ZIdTBKcKIWV2NqoD5ewEeV2LENbc2/SWA7KhgjDW7iJBgz3WfKrpS1sq\ncQ+h54QJYIb6ncfg4a1ADkOXPeDCanup2dQ86JcBkofsjmleKR8vq7LKstEL\nw/t+998zWVu8EftwGW06r/RtQBlmPJL2aXM69WwDL/jfyxeBVIZtpKfdpLc3\nEkuzcHVL8JVJTGGYoYvYbXGrh/FfSfzLfQjaw9Fv7aaJL1sbY2N/+D7w4gwa\nf76ktWPva7wPNYvM3QP7FqfeY7d7SFGa2P4apgdBFuKTEHQS3tWc3rgcR/tP\nxER1Lv9oVfnAvLwDJnjx9Ff7wPdhnN7pDGXEnKgw/pkkGHjjdbqFgJs9wduF\ne8mH8MjvGThJL0DqBe94b1IYtq6WGgJUpATQKtz8jKtnXvjYBXBfQhFSO6Lz\nYNEp0845t53UXiOVd1czPjhww9QKE+oh+va+JWpFFL6+1HAk5XohIpAToOXn\nGvf1\r\n=lgKm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n[![sponsor: Creative Tim](https://img.shields.io/badge/sponsor-Creative%20Tim-blue)](https://creative-tim.com/?affiliate_id=140482)\n\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x  |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n  - `resolveFromRoot` Boolean: if CWD is not the root (like in a monorepo) and you want to resolve from the root monorepo\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work after upgrading to v5/v6\n\nPlease make sure to [read the changelog](https://github.com/martpie/next-transpile-modules/releases).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nIf you get a transpilation error when using a custom Babel configuration, make sure you are using a `babel.config.js` and not a `.babelrc`.\n\nThe former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and may not work for Yarn for example, as it installs dependencies in a parent directory).\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, **IN CAPS**).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"glob":"^7.1.6","escalade":"^3.1.1","symlinked":"^0.5.0","enhanced-resolve":"^5.3.2","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.14.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.0.1","prettier":"^2.2.0","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.0.0-beta.1_1609188353094_0.7023515726955722","host":"s3://npm-registry-packages"}},"6.0.0-beta.2":{"name":"@module-federation/next-transpile-modules","version":"6.0.0-beta.2","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.0.0-beta.2","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"6839ea439c1d51abaf48a91bd9d696a2dbe27097","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.0.0-beta.2.tgz","fileCount":15,"integrity":"sha512-t1psAnY1622ziuwSXavd1LuSCrLEut9TjNuk5T+fA9Ddaht7/2MIbkf+9/J3OdjQueCVCaA+TjDp/jSMLxPRUw==","signatures":[{"sig":"MEQCHxSUzCp389sGimK1W6Hx6dUW1oGkWVsKe5u3JA1NyKcCIQCA0bSk21vgwbiqgUaZxa6A1nQasXiD4R7McwoTlvWRTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6kdKCRA9TVsSAnZWagAAOKAP/0zA1TSrX6bI+f/BnO45\n+ka1Ta0cIa9A/gcXCl9SElawHBOHuFijYHDV63NVx+9oG3fw/ttzk2W8aiVA\nkdUMowkbfpoGTjtNMKzvnjnC7SN/gFqegnReH4kJ+yx94ER+I5Mks+TEkecL\nPs8+bN/6S6UyimZjeLaFnnXKcFr3pI1PamNWagQAFvzoQ5fLfozJ+Tof3TCo\nlxXl9QR4En7ongniyNNQilyPCgEArlZC7OYp82I5tBD7jWvLh7e0LxgIpwHs\nrGsf0yjKub2lUSKncNhs77TWmuvO1vaOM+JUwawBjmDjOqXUZkcthKIqVuPz\nzGsd7ARXIHtsMBGcwzkKyIHBrgqwX59DKiUzmi7RLBtECS6jCbJ20Fdz+C9n\nRo1Uk+TEvGqlVKkp7mQ9CZVy2pPSjftDNDUUmw/10aAkJ/mWgvCCnYBPT593\nqnBHCnGcnToZwZFwOi6LbiFZWO4h9ofsRDdwcMCrjMxSAPpYIfsCdb5JntgN\nr8OPhr31e9kUHC94V+b89eNkxBntRahR597Vx+c5Qhh1qUkfs6oUtgX4W+fv\nfATohbkfP+JpFWrCJr12EwDco43x4msA/qVPbrkFmMjza9CbYS/7kenKOD5i\n8CvNA8WGKDZtajEOKwqosDFjL0xYJw+8ISKFN5pzovq3AKZa4776KS06wJ+2\n1QFB\r\n=1kXB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/next-transpile-modules)\n[![sponsor: Creative Tim](https://img.shields.io/badge/sponsor-Creative%20Tim-blue)](https://creative-tim.com/?affiliate_id=140482)\n\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\nSupports all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`.\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x  |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest version tested: **9.5.4**.\n\n## Installation\n\n```\nnpm install --save next-transpile-modules\n```\n\nor\n\n```\nyarn add next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `unstable_webpack5` Boolean: Enable [Next.js Webpack 5 support](https://nextjs.org/blog/next-9-5#webpack-5-support-beta) (experimental) (default to `false`)\n  - `resolveFromRoot` Boolean: if CWD is not the root (like in a monorepo) and you want to resolve from the root monorepo\n\n**note:** unstable features may break in any patch or minor release without any warning, be careful!\n\nExample:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['somemodule', 'and-another'], { unstable_webpack5: true });\n\nmodule.exports = withTM();\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('next-transpile-modules')(['styleguide/components']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work after upgrading to v5/v6\n\nPlease make sure to [read the changelog](https://github.com/martpie/next-transpile-modules/releases).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nIf you get a transpilation error when using a custom Babel configuration, make sure you are using a `babel.config.js` and not a `.babelrc`.\n\nThe former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and may not work for Yarn for example, as it installs dependencies in a parent directory).\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, **IN CAPS**).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide')\n      // ...\n    };\n    return config;\n  }\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config) => {\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n\n## Credits\n\nAll the honor goes to [James Gorrie](https://github.com/jamesgorrie) who created the first version of this plugin.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"glob":"^7.1.6","escalade":"^3.1.1","symlinked":"^0.5.0","enhanced-resolve":"^5.3.2","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.14.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.0.1","prettier":"^2.2.0","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.0.0-beta.2_1609189193956_0.4021594937711175","host":"s3://npm-registry-packages"}},"6.0.0-beta.3":{"name":"@module-federation/next-transpile-modules","version":"6.0.0-beta.3","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.0.0-beta.3","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/module-federation/next-transpile-modules#readme","bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"dist":{"shasum":"563601631e10eca351a94cd0b1f31a136a9648ee","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.0.0-beta.3.tgz","fileCount":15,"integrity":"sha512-v6TC9i3n11Br627oqI+6zdU2HcciMmh7ogvMmw2GFNQ4JzJBVNzbBzkB+kLeiGiwaaFMyHNYUih3E2g8fkOBiA==","signatures":[{"sig":"MEQCICFnZPi4uwsyeGc5epplWEYqyqVvA+dcZeFkUyvrOEW6AiBIsXIazAvrHhvLf9/a+sC7RGMq6+nTfPWrkle25ekFOQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/MMtCRA9TVsSAnZWagAAYzYP/1RdxZ+gulnZe8D+PqwS\nwO95ASHNxK7nGfmk5KAmknrpKr5rzfTiY0u31E8APzpO0oiocDyZ00AEMH4c\nDFyYmQ8xwxwn9b1jeSRo8AYG+KmOQloKkHlJt4/OiilQ8DqO5tJYA7BdYWf7\nqRkIIR0GqUuy4DvhpJqHM6QbRm7m0eFeTdP98PijlVlsYmgvvr5MjtoRmeNN\nXqS/ByucAmZvj8tVZm5MU2J0f/t+lMeXDtoto6QrVDCgr0tCRwKTNmPYfA+d\nrtFMVE6H5rzREpGkQsRpmBi1ZWx3d3TckD/IfK0Wc8I71TUir3wqImeM45zQ\n9dCOemI2SlWNMAKa/IJ/TXrJqY4HvG94xy4QLZatyNHkSX6KQDUsWGVbrw//\ne0w1/PV3fXS0ONlcroYr+98808r1TwJ8nEkZOgn4ChiC8k83gFF/po5PGuhI\nqvx2efJ25fCwUj+VGLApxNbjxt03RQTCLMXuqIV0x8VsRn4wamf1jUK8r+r1\nuuL5etTAJ6ako/DErMKEdRUM5BYy9mj6pWJMb3WL1rpas03bbRJNOqiWB5we\nkAxDdV7LxqA1qEtnoGzV+RB8QLGGywyz1S05wMq297EKTUEacX8gVIQsZWZS\nGFGulCjhed8GNs3pMikB+36qTkfuls59QyVe2fAyiYr0LtWlslwk397Xnp6O\nUhQX\r\n=OjAY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"glob":"^7.1.6","escalade":"^3.1.1","symlinked":"^0.5.0","enhanced-resolve":"^5.3.2","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.14.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.0.1","prettier":"^2.2.0","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.0.0-beta.3_1610400556602_0.6699167021614998","host":"s3://npm-registry-packages"}},"6.2.0":{"name":"@module-federation/next-transpile-modules","version":"6.2.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.2.0","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/module-federation/next-transpile-modules#readme","bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"dist":{"shasum":"042539336d301b3fbfa3dcc4a5755cee8e5e30ed","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.2.0.tgz","fileCount":15,"integrity":"sha512-9hzsJUd7OxC8poAiY7QteqESZSbPzgPsi9rPluFBH4/dFUir93oH+WlZK25MYC9s7ouUwpgnRlfaLqGmJg6n4g==","signatures":[{"sig":"MEYCIQCgX/LWHxEZbglFv9omwaHpAx6Hqwe4AoIPO1qh9uFDygIhALzknFU1YVGaTPrzQVhLLjNrH0Vmcob/EQqrANqS+up+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR9MoCRA9TVsSAnZWagAAEiEP/ArX82RqBfLYQ2q+esNn\nfNuFbYmJlHKmwjXwZTz0o21+h4tCMc82D2CeeoSFKR6XSUm0AjtNqiloQ2o9\n5LduqW7f6Naf0PwC0o0/uheoXc5ybeEjmFcV2aBNDNatMR/BNkAGhPc0/ajQ\nHIItQxi9rK9ms9XWOZePLE9SqhVEypoAEmolGw5PgRuoxZ19ar3AtojdfQA5\n7qY+Lbg77H1pfwBAL9PS/REASICOERP2RpgJII/tqOuTODLmLNR8780K+Hsj\nCw1HZZlGvIXHZfWef4nah1Y3Sk4oslcX2V/koUBnkbodbJANO4b8ouIeoTl7\nDCYo2cRsBvM6TNPYFnSVDbbIZuuhNDi+vfnRvJUcFiYKIag8i/45ufS5w1O/\nn5DNupDMgTxBxh4OZYbgVKQK7dB3mPf1PrFLfXLiFk1evwcaOVNZRTD/76/t\n6dvi5amntCwkrDWPhAYSnNO9fYiXKqEDOvUVw2CNwL8i180bQAXJxAGFIBYZ\nTbY1fbk9oJIkVIZ9bnRtn8U/xK5lNbyScZra49LJ7OPl1LYFb56rNoE4+ouf\n04vugMSJ3GcPn5fmggWtqz4zHh4CFKsCerdmmrZLKrZmhu+pgQwA4U7X4HNh\nRoG+WKaLCX4lF2GP660cMJN+jv2a7MabfEUqB34hgOYBiwXz5KMAl55GUEeq\nvuMc\r\n=IbW+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"glob":"^7.1.6","escalade":"^3.1.1","symlinked":"^0.5.0","enhanced-resolve":"^5.3.2","@kiwicom/monorepo-utils":"^0.24.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.14.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.0.1","prettier":"^2.2.0","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^6.15.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.2.0_1615319848408_0.8501404468250802","host":"s3://npm-registry-packages"}},"6.3.1-beta.0":{"name":"@module-federation/next-transpile-modules","version":"6.3.1-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Pierre de la Martinière","email":"pierre.de.la.martiniere@gmail.com"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.3.1-beta.0","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"5a5057e625d174c01c1e0679c5d8afeb029c5b85","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.3.1-beta.0.tgz","fileCount":6,"integrity":"sha512-dx6EPJGUfQJGttkFUlqOYVyHJ1mn/CyF55Irc8WsiZcXvo4i93PuclklaODX2FpYGmmnOXCe1REE+vNVkGVeZw==","signatures":[{"sig":"MEUCIQDJi7aUPKn4jQ1CM4Ua/dTdE8FKaPm7rBiGZvQbImSIRQIgNSXkJPYfKpqEukMnAQOtk8UeFIT0VK2MJcwQrGVmb44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUp2sCRA9TVsSAnZWagAAKOIP/34QbRoqrShtedt7VyzL\nINnOIWeC/3iqDGTnIb/CBz8PQl6eyVg97f5wTjc/T+1TlZhsUANHFaFIkIoR\npPa+BKn7nJSE2m2yr8jV9kYpdiqMisL4tnEqVFItbZ/ahMm9PXsZybDn//is\nj+lRo7Ouus7Eb0AWSBsmqoyaM/HoaMf5pV/gcOpwnEfLSBd6NHS83Sobd3dj\n7SCGYO2n8IocNuarueQ7fC7z20xb3juFwPfVZ0L3mVfQqN14gzMbpRZdrTxK\n9pxP0XmNjaqX/mOd0ZdrTC16UMJR9AA6cJOtNZ1N5l4wjWKYiJe9j+DQj6Bm\nedHGQUVanoKVW/6g1VL1w44TMKfseNSYFPM5Z4JPO2i83s/C34eWf81lrM7x\nZOH7B48EVFbN6F5Q3ivHzHPdXLGOYBRfGqgYCWl2U8X+kASPlUHMGdj9jdDA\nIGJTQoHPQe/uDym9OuadGGXEEZYH4wLGlY/RbvORnaHyvfM29bKoznbYiEa3\n8QFfkX9mma1C40VKcY8200Qbe8aMjJXDucSGZa1u8Z+VwENj2EUHXHKTPR9N\nCNKUD200JN5iAJmfTnq8wsx10/zypeAJagGVmz3H9DRQYVG7QYMpPMVDQ834\ntMG7lu3j4LbpHa2cFPsNvrhY8f7Vc7axJ+jmGGuJNrKaEGMQ+inTZ7dQ/pu/\n25aI\r\n=cJ2l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/@module-federation/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/@module-federation/next-transpile-modules)\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x  |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest Next.js version tested: **10.0.8**.\n\n## Installation\n\n```\nnpm install --save @module-federation/next-transpile-modules\n```\n\nor\n\n```\nyarn add @module-federation/next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (most of the time, you won't want that) (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `__unstable_matcher` (path) => boolean: Custom matcher that will override the default one. Don't use it.\n\n#### Note on Webpack 5 support\n\nSince `6.2.0` (with `next@10.0.6`), Webpack 5 support is automatically enabled via the `future.webpack5` flag, but is experimental and may break in any patch or minor release (from both `next` or `@module-federation/next-transpile-modules`) without any warning, be careful!\n\n#### Examples\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']);\n\nmodule.exports = withTM({\n  future: {\n    webpack5: true,\n  },\n});\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide/node_modules/lodash-es']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('@module-federation/next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `@module-federation/next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `@module-federation/next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `@module-federation/next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work after upgrading to v5/v6\n\nPlease make sure to [read the changelog](https://github.com/martpie/@module-federation/next-transpile-modules/releases).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nIf you get a transpilation error when using a custom Babel configuration, make sure you are using a `babel.config.js` and not a `.babelrc`.\n\nThe former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and may not work for Yarn for example, as it installs dependencies in a parent directory).\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### How do I find out which package is causing a runtime exception?\n\n- add `config.optimization.minimize = false;` to you `next.config.js`'s Webpack configuration\n- run a production build\n- run it on the browser throwing the error\n- open the console, jump to the line where it failed\n- goes a little bit up in the lines of code, and check the Webpack comments telling you which module is affected\n\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, **IN CAPS**).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/@module-federation/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `@module-federation/next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n+   if (options.isServer) {\n+     config.externals = ['react', ...config.externals];\n+   }\n+\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.3.1-beta.0_1616027052119_0.8074385736654022","host":"s3://npm-registry-packages"}},"6.3.0":{"name":"@module-federation/next-transpile-modules","version":"6.3.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Zack Jackson"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.3.0","maintainers":[{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"9f22a2aa7254352601816369933141145d349cf3","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.3.0.tgz","fileCount":6,"integrity":"sha512-GB0LpQ0dEtXwahRIRHQW4DW+ektzd5TjkwejmIX2Z9/oWdCSSXjEirJCCb543Uhcr2wMc9ce+Gb7WazWz6nNVA==","signatures":[{"sig":"MEUCIQC7NbBwkhVGLJIwJFogep554AVuSWH4d3k0sKUr1pSzUQIgKfVOE/UYkoVLZ0ubsH6uX4Gj4NwUNLogCHLl8YvStEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUqKrCRA9TVsSAnZWagAAn5QP/RpE7GFh5AEUNzojYJdc\nZaeGBrYPIJsK/5nuaGGuuWntzivh0am4vnLzd5T2Or1OpNLqJYJ1+4EorlXc\n8tIP0vF5Jprr4bQonRzZbFs612TUI86cBM2lldPL3nxGJj2NqVlryOu4y3gv\ntEyfjOLocUzNymxxF41H45iU9jCFvFZi4//GHoTsVkVK5BVjn1OEPbkFeNgW\n6HVe2FAPFcfzeJOlid5GLeWQ0xGdeYymgNywRqhqXWYDYbMwGzgAjlVwE31m\nVhOhw9YhSNC7vJrP+iTl3fEZIKPoXqHTqxtzQqlvAuFRGUpOnc7MzwcSw4pd\nyiAzpjK/2EESQULN2Ixbv6I0kueof50afwQZ4rDTZVo0op3/bBSFKff2h7Np\nuV2FFSzLqGtgqx1jTPG5N4Rg5irbNmCTInIccNW0szRmEWQAJiVNm5DU6unO\nYFLI4D7A7PzsLey7xXyTejd2+PrZRiGQ10wpAmsdUwj8+crc38zHkeUWtfoQ\nw/q5kak3iI6780vMDWIbpvDF5CqanhOcRO5wKsRrSFooaoCVCOP49ThDFtBr\nvxNE2oGh9ao37endrMVHMtkOm8ZHVeyXiJx+OKFI/1wMfccK2sAFi5Oa0DbZ\nA4TM//xAHLmxWexZX2lnwTiCVzQYrkoNHnniTUwK/4f1wTiPKzXNocUUiEn5\nvRPl\r\n=fl9k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-worskpaces && npm run test:prepare:webpack-5 && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-worskpaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.3.0_1616028330543_0.45326171612954025","host":"s3://npm-registry-packages"}},"6.4.0":{"name":"@module-federation/next-transpile-modules","version":"6.4.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Zack Jackson"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.4.0","maintainers":[{"name":"tysonrm","email":"tyson.midboe@gmail.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"8aba62a4d250d86a019b19e06724451320268f1e","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.4.0.tgz","fileCount":6,"integrity":"sha512-XZF+ZMsnvG4tmN4IQYC8v0A3UYLh+xHMIO6SGd/hE3sVkVOKr6Tueg/G2hYhiDZMWxdkqL5Z4q3rFt7aJjbLrQ==","signatures":[{"sig":"MEQCIC8mKGdr9Yqa7W1DxnPumDXaSHYCLqiK5GFZnISlS1dwAiAeijVlvIw8rEZsBTVVp8eKoycLj0YzeI+DmRrtoFDWIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY24jCRA9TVsSAnZWagAABvgP/0pFeDsXVchu69JgE++R\nMLuQuP/LvybPSrysSR14+jeF6Oc/f7eSZxClNJ4cSf1wilrrLmCuxiNiKkpI\nfkVd5OZFjzgP6//JmYHnhM1/0F/1IAmB3qVCOxW6UwqqpPcXTXZ6mAHEwoyk\n47S6vw5bjnYI189nTGoszf6QQrkPT1yh9sm6eSCF1CxasM+jXwW8j7p/qk3R\n03KZP4IH907ORA5GWFkWmAZ7bbrVEBS9cQUe1yFbPc6OG89XHRCg8JDSMdbx\n3qYaf3lNgJQdU6WrIAkFh/4GOm4j9p8YZYlBTJgeEGcHOM7NRn97Auzix6fR\nWfGxKYwZjjw1cUnK8CyDllqEcnP9LqIwqzMHFBKmLBp39cCJL63M9l/Xz0G+\nLVoxsQ1OeZGPZePth4rRRC/0GXrARO6FjeiSjOktkokMfwyVHiPfREvO7diZ\nCNedLxzvOubCKeXcWhU7FtFLB0oBCs9nLunY9lU7hya6vqY9P5YuEVYpm90+\nrjbvUgU+lHQjppDlXpEVW9IUl8geIYTEcygbopGss8BPFk5uSuXE2nXkhd5l\nbkA/r1W6bA0EXb12gxskfLUXspHVWM1Yy2IlDy/ehUlP6V59NttS3mQ6JB3E\niCw1eZprube6i1tYqlmOze3fyvIA6xXffQYIkVTascbGL0EnKYF5FPD1d8pS\nv1VZ\r\n=jKU7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-5 && npm run test:prepare:webpack-5-symlinks && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-workspaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build","test:prepare:webpack-5-symlinks":"yarn --cwd src/__tests__/__apps__/webpack-5-symlinks/app run build","test:prepare:yarn-workspaces-symlinks":"yarn --cwd src/__tests__/__apps__/yarn-workspaces-symlinks/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.4.0_1617128995434_0.6564229013634446","host":"s3://npm-registry-packages"}},"6.4.1-beta.0":{"name":"@module-federation/next-transpile-modules","version":"6.4.1-beta.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Zack Jackson"},"license":"MIT","_id":"@module-federation/next-transpile-modules@6.4.1-beta.0","maintainers":[{"name":"tysonrm","email":"tyson.midboe@gmail.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"382f248826dfd61e4bf852aa7026dcdfd86dff59","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-6.4.1-beta.0.tgz","fileCount":6,"integrity":"sha512-2HBxO8nKJlobdCoVHTIbD92ckYi/D2nkY/EYTuVi0gswOGTlutVM6mNIC25mVnMh+TSQKYd1kMH0bouavks/Cg==","signatures":[{"sig":"MEYCIQCkJ/EDM0iRD+2ZrMSm1fWuDewKjePxCoCMMFzOwviGUAIhAIIZZ9/VPHU+y1EApXOqLbYBl8GEyQBz4CD9BEE5kZz0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqEwRCRA9TVsSAnZWagAAG+EP/RBD63IcYtWCXHzsOPxY\nVGKNWS9+T6mqPKIBBugLkTUOqrm0l3MSRoZwjNzgI1yN6efogKj99ridxpTd\novvmQS21GihjojuAJ+b7vJfoYL7p3Ion/chm+k8R7Q3gFa4Zq2i1nh7lb8dz\n35E3gCHhNBWshux8IzC9Jul/3y9WVlaqwsLSM0My3oDCHgkbW+yQKLTHZqq8\npTQdG1eKDS5jJUpAVel8TpjrZMqdLuPM2vj1X8yP+cEV/2m2ImuTrWkk4aDc\n8MHl/y+tUxCWwr5xgSu/xBDNrAa+XqMaEFsxCBaxt3tEGnpAjb5EyurPB66V\nLF45+Ka+qrF6Bv0mLfVSuCJ8jgXALXY7D48hZ+NhxdbUZZm8LLW2thvlDNLy\ni0qy6IE5OQ6hW3+vp5dlo8tl0NODV5QVVQlaqvtCRLJCAOxgAYVNOqYuONcq\naoIkkBlAtMq0g0rD4mFuUYtvcV/HLB/TZ0Mp4EKWvdpFOR4vT8O942q1/spZ\ntnRXz3W0/kNhoDjQkdIuHxKNeDZzPFNpCBUQzQQAG0itMzOuOsjNUzc2Tbyc\nhpPzoqv9ECsKS95opShlnFG5E66AldB9kix7dkvTkfDI7gmkeu7J43FeilgV\ngm9QEvP7wS4NBLeqgcEFgxZ9ysLWBFxHDggY4QXdo8+EhN2mf8EsGAN23fG1\nbpGf\r\n=Fcmf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/@module-federation/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/@module-federation/next-transpile-modules)\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version |\n| ----------------- | -------------- |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x  |\n| Next.js 9.2       | 3.x            |\n| Next.js 8 / 9     | 2.x            |\n| Next.js 6 / 7     | 1.x            |\n\nLatest Next.js version tested: **10.0.8**.\n\n## Installation\n\n```\nnpm install --save @module-federation/next-transpile-modules\n```\n\nor\n\n```\nyarn add @module-federation/next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (default to `false`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `__unstable_matcher` (path) => boolean: Custom matcher that will override the default one. Don't use it.\n\n#### Note on `resolveSymlinks`\n\nNode.js resolution is based on the fact that symlinks are resolved. Not resolving them will alter the behavior, but there are some cases where the alternative behavior makes things a lot easier:\n\n- You are using `npm/yarn link` to link packages into node_modules.\n- You are using `npm` with `file:` dependencies that live outside of your project directory\n  - `npm` will create symlinks in this case. Yarn will copy instead.\n\nIf this **doesn't** apply to your use case **you should set `resolveSymlinks: true`**, which results in the original behavior and **better performance**.\n\nThe following thing will use symlinks, but work great with `resolveSymlinks: true`:\n\n- `pnpm`\n- `yarn` workspaces\n- `yarn 2` portals\n\n#### Note on Webpack 5 support\n\nSince `6.2.0` (with `next@10.0.6`), Webpack 5 support is automatically enabled via the `future.webpack5` flag, but is experimental and may break in any patch or minor release (from both `next` or `@module-federation/next-transpile-modules`) without any warning, be careful!\n\n#### Examples\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']);\n\nmodule.exports = withTM({\n  future: {\n    webpack5: true,\n  },\n});\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide/node_modules/lodash-es']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('@module-federation/next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `@module-federation/next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `@module-federation/next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `@module-federation/next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work after upgrading to v5/v6\n\nPlease make sure to [read the changelog](https://github.com/martpie/@module-federation/next-transpile-modules/releases).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nIf you get a transpilation error when using a custom Babel configuration, make sure you are using a `babel.config.js` and not a `.babelrc`.\n\nThe former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and may not work for Yarn for example, as it installs dependencies in a parent directory).\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### How do I find out which package is causing a runtime exception?\n\n- add `config.optimization.minimize = false;` to you `next.config.js`'s Webpack configuration\n- run a production build\n- run it on the browser throwing the error\n- open the console, jump to the line where it failed\n- goes a little bit up in the lines of code, and check the Webpack comments telling you which module is affected\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, **IN CAPS**).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/@module-federation/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `@module-federation/next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n+   if (options.isServer) {\n+     config.externals = ['react', ...config.externals];\n+   }\n+\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","scripts":{"test":"jest --forceExit","pretest":"node --trace-uncaught src/__tests__/setup.js","quickie":"node --trace-uncaught src/__tests__/setup.js && npm run dev --prefix src/__tests__/__apps__/npm-basic","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-5 && npm run test:prepare:webpack-5-symlinks && npm run test:prepare:pnpm","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-5":"yarn --cwd src/__tests__/__apps__/webpack-5/app run build","test:prepare:yarn-workspaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build","test:prepare:webpack-5-symlinks":"yarn --cwd src/__tests__/__apps__/webpack-5-symlinks/app run build","test:prepare:yarn-workspaces-symlinks":"yarn --cwd src/__tests__/__apps__/yarn-workspaces-symlinks/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_6.4.1-beta.0_1621642257214_0.7140241637710911","host":"s3://npm-registry-packages"}},"7.2.0":{"name":"@module-federation/next-transpile-modules","version":"7.2.0","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Zack Jackson"},"license":"MIT","_id":"@module-federation/next-transpile-modules@7.2.0","maintainers":[{"name":"tysonrm","email":"tyson.midboe@gmail.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/martpie/next-transpile-modules#readme","bugs":{"url":"https://github.com/martpie/next-transpile-modules/issues"},"dist":{"shasum":"4c4acc3354f1efe0893664280960ce6466e36437","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-7.2.0.tgz","fileCount":7,"integrity":"sha512-jXtcM4M+Eafrgv6XQFnixI+efClWbWVbQ2RuGxeV8BE37boM/oUDMC6O0U8EvwG6i6AKKPzM03coibnCXYDWCQ==","signatures":[{"sig":"MEUCIAZshxoT+maoUNLUzFNzPtIesE+itIARPp0buGRubVzfAiEArB4Oy4BT12Wi4DdyKlaknSQfOPHNwdjrVYN0HtVkJMY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqFx1CRA9TVsSAnZWagAAoWoP/0HogUvQ9j/sSPHvLYSB\nzsM16Dqc2iKuFtLGSAr/I/5wA9EfEDDkTg+lxEt4oO6jx3XbWh2j85kaQNK3\njILwTU7JoGYwlvPmDsROo029m1MXeuMumoUCmpKVv9XELuuEG7wOqlIaY1rR\nsO+P7Fpn0nQDD2OwG85gDxXZ/+Bbyb0fuyWl09ddqLYefKfl3Lk6/kpK9G+3\nJmRygOSXeAOyTr2w3VK7SPIMqu679KueMgf0xJ+/0pJB5mH0U1j+RoEOr1ug\nkWDbXN3vV2ktlbKVAiQYhl3VHLtn1ZnWY090U6k7PtefacMYIsvGOv8NDYLI\n7B0sbOgV4y+jMHtM1YJUlbe4bUhZPA3CMAfNoHV4C0Gt+/UYkB43oZ5X3R5d\nNh10H5cmmN+z8VBtqRFtezyYYutmOat4xjFr87kDcBDbD98yYVO0uJG2noI9\nmNbh5HI1x/RCCBnIAOcuggw6g6kHtzHgodv4VeIzvQZkKAm0t3L8IE0oEFv0\nRkBFHuxBoilwL+tzL+/8+jmubnewLmfyu80NU9QfrQbj2XRGUt9DeC/e/Luj\nYeWNMAgUUT/z+7CxMATtSrbOY633Y+nWyS0cKj6ZCpMsGDgOkvRYa4dbecVE\nvBKChPZIfyIBTPD8pgstd/KmWmoVwYTujRSHA348ZSsFtPqP2N6BedR66BlW\na21e\r\n=05/X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","setup":"node --trace-uncaught src/__tests__/setup.js","pretest":"npm run setup","quickie":"node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run dev","typings":"tsc","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","update:next":"npm run setup && bash scripts/next-update.sh","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-4 && npm run test:prepare:webpack-4-symlinks && npm run test:prepare:pnpm","prepublishOnly":"npm run typings","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-4":"yarn --cwd src/__tests__/__apps__/webpack-4/app run build","test:prepare:yarn-workspaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build","test:prepare:webpack-4-symlinks":"yarn --cwd src/__tests__/__apps__/webpack-4-symlinks/app run build","test:prepare:yarn-workspaces-symlinks":"yarn --cwd src/__tests__/__apps__/yarn-workspaces-symlinks/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/martpie/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","typescript":"^3.9.7","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_7.2.0_1621646453053_0.7787929000873544","host":"s3://npm-registry-packages"}},"7.2.1":{"name":"@module-federation/next-transpile-modules","version":"7.2.1","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"author":{"name":"Zack Jackson"},"license":"MIT","_id":"@module-federation/next-transpile-modules@7.2.1","maintainers":[{"name":"tysonrm","email":"tyson.midboe@gmail.com"},{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},{"name":"marais","email":"me@maraisr.com"}],"homepage":"https://github.com/module-federation/next-transpile-modules#readme","bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"dist":{"shasum":"c385fdec135ce2b49ff8c9f2c85b72ce175e5bb9","tarball":"https://registry.npmjs.org/@module-federation/next-transpile-modules/-/next-transpile-modules-7.2.1.tgz","fileCount":7,"integrity":"sha512-qBYSMa24PtDs5wBY3OmqnP0PpaDgX5wwinlslBvy+HEBTRFyC15fPX57cFv5ibzlyyN5+q3s8JRUsMrFyTbcWA==","signatures":[{"sig":"MEYCIQDIkvENywhHlvf6Re4bxackcUKDyUGqedJGDlWQWXQQDgIhAPCCT8MpZZ4dcapP0ezoycvvnlXmW0KQuGCeAtQsr2As","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqFzmCRA9TVsSAnZWagAA5xoP/jFVEBj6ea5iDyq9GsZy\nERbD9kIBy+nyP4+miw2xHjAyiCqFhs9wL6X0Pr3na3wOwBhpSgEWJ4254fNg\ngfmoUiQWcb7xqFKRj0Z68xpnJZ+zMWpEWnDVkPGBoxhGGXKiI6pfGgqT3m+7\nwEnE2/GT4UXW30KQq7wTG+/IDbbcjRuN6HT2BQTiYCWzhsB+Q8yNOWl/NxmO\nzEZ29AaR8cHxIGd3JtTFK+Pk/Vcd9jQ+nWaZM2ub2t22eV2UpzsY04E45iC0\n7hvxx1T/N9KnSXXWxRT2f7r+GABDCLyR2Lmoln0JXl5a2li8iGoQ24AEdWue\nU3FxPYGwfQQfRtdgKckhvWxOkersYGzr0JWHYSyBWuCTZLOjx6saIWV2se4+\nJKm16xNzq6JNB+9l9d4ysjpXznxPGXZjd+ynozVJ/kFYlnRVKwERPN2+IUU8\nsyW/vziLmsd2yiWt422/bPEvdIDaLrTMC5i4eNDc6ygz0ipiRUvdJzkS56s4\nyXDrN1/5jGPgc7Dm8520JN7oZygT/aZmLu4gQtumc4yrj+hpHSgLTmkUDzYM\nUahhTaaj9bQecGKqYzr7uZnzIAf+brov1ciji+2HtSTM3sdFRQ+rhAuonuXV\nIh9A+6VfzTn+Mo7OPdbAdXLRl3U7la5qgT+6t8sAQJV4a2Dx8z6I4Jhg9wWw\nZ97/\r\n=CTuL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/next-transpile-modules.js","scripts":{"test":"jest --forceExit","setup":"node --trace-uncaught src/__tests__/setup.js","pretest":"npm run setup","quickie":"node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run dev","typings":"tsc","test:lint":"eslint .","test:debug":"jest --detectOpenHandles --forceExit","update:next":"npm run setup && bash scripts/next-update.sh","test:prepare":"npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-4 && npm run test:prepare:webpack-4-symlinks && npm run test:prepare:pnpm","prepublishOnly":"npm run typings","test:formatting":"prettier --check \"**/*.js\"","test:prepare:pnpm":"npm run build --prefix=src/__tests__/__apps__/pnpm","test:formatting:fix":"prettier --check \"**/*.js\" --write","test:prepare:npm-basic":"npm run build --prefix=src/__tests__/__apps__/npm-basic","test:prepare:webpack-4":"yarn --cwd src/__tests__/__apps__/webpack-4/app run build","test:prepare:yarn-workspaces":"yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build","test:prepare:webpack-4-symlinks":"yarn --cwd src/__tests__/__apps__/webpack-4-symlinks/app run build","test:prepare:yarn-workspaces-symlinks":"yarn --cwd src/__tests__/__apps__/yarn-workspaces-symlinks/app run build"},"_npmUser":{"name":"zackljackson","email":"zackary.l.jackson@gmail.com"},"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Pierre de la Martinière\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"escalade":"^3.1.1","enhanced-resolve":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.18.0","rewire":"^4.0.1","webpack":"^4.44.0","fs-extra":"^9.1.0","prettier":"^2.2.1","puppeteer":"^5.5.0","typescript":"^3.9.7","jest-puppeteer":"^4.4.0","prettier-eslint":"^12.0.0","eslint-plugin-jest":"^24.1.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","jest-environment-node":"^26.6.2","eslint-config-prettier":"^7.2.0","eslint-plugin-standard":"^5.0.0","eslint-config-semistandard":"^15.0.1","jest-environment-puppeteer":"^4.4.0","@types/jest-environment-puppeteer":"4.4.1"},"_npmOperationalInternal":{"tmp":"tmp/next-transpile-modules_7.2.1_1621646565734_0.7989168339644181","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-03-05T23:11:40.759Z","modified":"2025-09-03T04:33:07.144Z","3.0.2-beta.0":"2020-03-05T23:11:41.148Z","3.0.2-beta.1":"2020-03-06T00:02:19.158Z","3.3.0":"2020-07-07T18:56:51.610Z","3.3.1":"2020-07-07T19:01:20.258Z","3.3.2":"2020-07-07T19:56:14.637Z","3.3.3":"2020-07-08T19:33:44.293Z","3.3.4":"2020-07-08T19:42:52.584Z","3.3.5":"2020-07-16T18:26:42.176Z","3.3.6":"2020-07-16T19:24:12.895Z","3.3.7":"2020-07-17T00:13:56.791Z","3.3.8":"2020-07-17T00:23:57.835Z","3.3.9":"2020-07-21T22:59:26.898Z","3.3.10":"2020-07-21T23:06:42.426Z","3.3.11":"2020-07-28T18:05:26.749Z","4.0.1":"2020-07-28T18:19:07.971Z","4.0.2":"2020-07-29T19:52:15.695Z","4.1.1":"2020-08-24T18:34:56.018Z","4.1.2":"2020-08-26T17:10:54.914Z","4.2.0-beta.0":"2020-09-23T21:12:57.268Z","4.2.0-beta.1":"2020-09-23T21:28:00.550Z","4.2.0":"2020-10-12T17:38:41.794Z","4.2.1":"2020-10-13T16:32:46.246Z","4.3.0-beta.0":"2020-11-12T23:28:47.609Z","3.4.0-beta.1":"2020-11-12T23:39:29.995Z","4.3.0-beta.1":"2020-11-12T23:39:43.491Z","4.3.0-beta.2":"2020-11-12T23:44:05.687Z","4.5.0-beta.0":"2020-11-13T03:12:56.063Z","5.0.0-beta.6":"2020-11-13T21:51:42.598Z","5.0.0-beta.7":"2020-11-18T04:42:15.209Z","5.0.0-beta.8":"2020-11-18T05:32:58.185Z","5.0.0-beta.9":"2020-11-18T05:56:16.632Z","5.0.0-beta.10":"2020-11-18T06:01:09.419Z","5.0.0-beta.11":"2020-11-20T22:18:50.300Z","5.0.0-beta.12":"2020-11-23T20:12:30.572Z","6.0.0-beta.0":"2020-12-07T22:40:30.402Z","6.0.0-beta.1":"2020-12-28T20:45:53.226Z","6.0.0-beta.2":"2020-12-28T20:59:54.154Z","6.0.0-beta.3":"2021-01-11T21:29:16.722Z","6.2.0":"2021-03-09T19:57:28.573Z","6.3.1-beta.0":"2021-03-18T00:24:12.339Z","6.3.0":"2021-03-18T00:45:30.739Z","6.4.0":"2021-03-30T18:29:55.592Z","6.4.1-beta.0":"2021-05-22T00:10:57.393Z","7.2.0":"2021-05-22T01:20:53.418Z","7.2.1":"2021-05-22T01:22:45.872Z"},"bugs":{"url":"https://github.com/module-federation/next-transpile-modules/issues"},"author":{"name":"Zack Jackson"},"license":"MIT","homepage":"https://github.com/module-federation/next-transpile-modules#readme","keywords":["next","next.js","plugin","transpile","modules","babel","webpack"],"repository":{"url":"git+https://github.com/module-federation/next-transpile-modules.git","type":"git"},"description":"Next.js plugin to transpile code from node_modules (supports TypeScript)","maintainers":[{"email":"zackary.l.jackson@gmail.com","name":"zackljackson"},{"email":"TwoHeal@163.com","name":"heal"},{"email":"codingzx@gmail.com","name":"shawzhou"},{"email":"giorgiob.boa@gmail.com","name":"gioboa"}],"readme":"# Next.js + Transpile `node_modules`\n\n![Build Status](https://github.com/martpie/@module-federation/next-transpile-modules/workflows/tests/badge.svg)\n![Dependencies](https://img.shields.io/david/martpie/@module-federation/next-transpile-modules)\n\nTranspile modules from `node_modules` using the Next.js Babel configuration.\n\nMakes it easy to have local libraries and keep a slick, manageable dev experience.\n\n- Supports transpilation of all extensions supported by Next.js: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.css`, `.scss` and `.sass`\n- Enable hot-reloading on local packages\n- Most setups should work out of the box (npm, yarn, pnpm, ...)\n\n## What problems does it solve?\n\nThis plugin aims to solve the following challenges:\n\n- code transpilation from local packages (think: a monorepo with a `styleguide` package)\n- code transpilation from NPM modules using ES6 imports (e.g `lodash-es`)\n\nWhat this plugin **does not aim** to solve:\n\n- any-package IE11-compatible maker\n\n## Compatibility table\n\n| Next.js version   | Plugin version     |\n| ----------------- | ------------------ |\n| Next.js 9.5+ / 10 | 4.x, 5.x, 6.x, 7.x |\n| Next.js 9.2       | 3.x                |\n| Next.js 8 / 9     | 2.x                |\n| Next.js 6 / 7     | 1.x                |\n\nLatest Next.js version tested: **10.2.0**.\n\n## Installation\n\n```\nnpm install --save @module-federation/next-transpile-modules\n```\n\nor\n\n```\nyarn add @module-federation/next-transpile-modules\n```\n\n## Usage\n\n### withTM(transpileModules [, options])\n\n- `transpileModules` String[]: modules to be transpiled\n- `options` Object (optional)\n  - `resolveSymlinks` Boolean: Enable symlinks resolution to their real path by Webpack (default to `true`)\n  - `debug` Boolean: Display some informative logs in the console (can get noisy!) (default to `false`)\n  - `__unstable_matcher` (path) => boolean: Custom matcher that will override the default one. Don't use it.\n\n#### Note on `resolveSymlinks`\n\nNode.js resolution is based on the fact that symlinks are resolved. Not resolving them will alter the behavior, but there are some cases where the alternative behavior makes things a lot easier.\n\nIf:\n\n- You are using `npm/yarn link` to link packages into node_modules.\n- You are using `npm` with `file:` dependencies that live outside of your project directory\n  - `npm` will create symlinks in this case. Yarn will copy instead.\n\n**you should set `resolveSymlinks: false`**, which results which will make things work as expected.\n\nFor other scenarios like:\n\n- `pnpm`\n- `yarn/npm` workspaces\n- `yarn 2` portals\n\nyou should keep `resolveSymlinks: true` (default).\n\n#### Examples\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']); // pass the modules you would like to see transpiled\n\nmodule.exports = withTM();\n```\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['somemodule', 'and-another']);\n\nmodule.exports = withTM({\n  future: {\n    webpack5: false, // you want to keep using Webpack 4\n  },\n});\n```\n\n**Notes:**\n\n- please declare `withTM` as your last plugin (the \"most nested\" one).\n- ~~make sure all your packages have [a valid `main` field](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main).~~ (not needed anymore since `7.1.0`)\n- there is currently no way to transpile only parts of a package, it's all or nothing\n\n### Scoped packages\n\nYou can include scoped packages or nested ones:\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@shared/ui', '@shared/utils']);\n\n// ...\n```\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide/node_modules/lodash-es']);\n\n// ...\n```\n\n### With `next-compose-plugins`:\n\n```js\nconst withPlugins = require('next-compose-plugins');\nconst withTM = require('@module-federation/next-transpile-modules')(['some-module', 'and-another']);\n\nmodule.exports = withPlugins([withTM], {\n  // ...\n});\n```\n\n### CSS/SCSS support\n\nSince `@module-federation/next-transpile-modules@3` and `next@>9.2`, this plugin can also transpile CSS included in your transpiled packages. SCSS/SASS is also supported since `@module-federation/next-transpile-modules@3.1.0`.\n\nIn your transpiled package:\n\n```js\n// shared-ui/components/Button.js\nimport styles from './Button.module.css';\n\nfunction Button(props) {\n  return (\n    <button type='button' className={styles.error}>\n      {props.children}\n    </button>\n  );\n}\n\nexport default Button;\n```\n\n```css\n/* shared-ui/components/Button.module.css */\n.error {\n  color: white;\n  background-color: red;\n}\n```\n\nIn your app:\n\n```js\n// next.config.js\nconst withTM = require('@module-federation/next-transpile-modules')(['shared-ui']);\n\n// ...\n```\n\n```jsx\n// pages/home.jsx\nimport React from 'react';\nimport Button from 'shared-ui/components/Button';\n\nconst HomePage = () => {\n  return (\n    <main>\n      {/* will output <button class=\"Button_error__xxxxx\"> */}\n      <Button>Styled button</Button>\n    </main>\n  );\n};\n\nexport default HomePage;\n```\n\nIt also supports global CSS import packages located in `node_modules`:\n\n```jsx\n// pages/_app.js\nimport 'shared-ui/styles/global.css'; // will be imported globally\n\nexport default function MyApp({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\n## FAQ\n\n### What is the difference with `@weco/next-plugin-transpile-modules`?\n\n- it is maintained, `@weco`'s seems dead\n- it supports TypeScript\n- it supports CSS modules (since Next.js 9.2)\n- it supports `.mjs`\n\n### A new version of Next.js is available/I just setup my project, and my build is breaking because of this plugin\n\nIt is important to understand that this plugin is a big hack of the Next.js Webpack configuration. When the Next.js team pushes an update to their build configuration, the changes `@module-federation/next-transpile-modules` bring may be outdated, and the plugin needs to be updated (which is a breaking change for this plugin, as the updated plugin is usually not retro-compatible with the previous versions of Next.js).\n\nNow, this build problem can happen when you install your dependencies with `npm install`/`yarn install` (in your CI pipeline for example). Those commands **may re-resolve your `next` dependency of your `package.json` to a newer one**, and this newer one may have critical Webpack changes, hence breaking your build.\n\nThe way to fix it is easy, and it is what you should always do: **install your dependencies with `npm ci` (\"clean install\") or `yarn --frozen-lockfile`**. This will force `npm` or `yarn` to use the version of Next.js declared in your lock file, instead of downloading the latest one compatible with the version accepted by your `package.json`.\n\nSo basically: use your lock files right, and understand what problems they are solving ;)\n\nmore:\n\n- check the [compatibility table](#compatibility-table) of this plugin\n- read more about semver and version resolutions: https://docs.npmjs.com/misc/semver\n\n### I have trouble making it work after upgrading to v5/v6\n\nPlease make sure to [read the changelog](https://github.com/martpie/@module-federation/next-transpile-modules/releases).\n\n### I have trouble with transpilation and my custom `.babelrc`\n\nIf you get a transpilation error when using a custom Babel configuration, make sure you are using a `babel.config.js` and not a `.babelrc`.\n\nThe former is [a project-wide Babel configuration](https://babeljs.io/docs/en/config-files), when the latter works for relative paths only (and may not work for Yarn for example, as it installs dependencies in a parent directory).\n\n### I have trouble with Yarn and hot reloading\n\nIf you add a local library (let's say with `yarn add ../some-shared-module`), Yarn will copy those files by default, instead of symlinking them. So your changes to the initial folder won't be copied to your Next.js `node_modules` directory.\n\nYou can go back to `npm`, or use Yarn workspaces. See [an example](https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) in the official Next.js repo.\n\n### How do I find out which package is causing a runtime exception?\n\n- add `config.optimization.minimize = false;` to you `next.config.js`'s Webpack configuration\n- run a production build\n- run it on the browser throwing the error\n- open the console, jump to the line where it failed\n- goes a little bit up in the lines of code, and check the Webpack comments telling you which module is affected\n\n### I have trouble making it work with Lerna\n\nLerna's purpose is to publish different packages from a monorepo, **it does not help for and does not intend to help local development with local modules** (<- this, **IN CAPS**).\n\nThis is not coming from me, but [from Lerna's maintainer](https://github.com/lerna/lerna/issues/1243#issuecomment-401396850).\n\nSo you are probably [using it wrong](https://github.com/martpie/@module-federation/next-transpile-modules/issues/5#issuecomment-441501107), and I advice you to use `npm` or Yarn workspaces instead.\n\n### But... I really need to make it work with Lerna!\n\nAgain, most probably a bad idea. You may need to tell your Webpack configuration how to properly resolve your scoped packages, as they won't be installed in your Next.js directory, but the root of your Lerna setup.\n\n```js\nconst withTM = require('@module-federation/next-transpile-modules')(['@your-project/shared', '@your-project/styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      // Will make webpack look for these modules in parent directories\n      '@your-project/shared': require.resolve('@your-project/shared'),\n      '@your-project/styleguide': require.resolve('@your-project/styleguide'),\n      // ...\n    };\n    return config;\n  },\n});\n```\n\n### I have trouble with duplicated dependencies or the `Invalid hook call` error in `react`\n\nIt can happen that when using `@module-federation/next-transpile-modules` with a local package and `npm`, you end up with duplicated dependencies in your final Next.js build. It is important to understand _why_ it happens.\n\nLet's take the following setup: one Next.js app (\"Consumer\"), and one Styleguide library.\n\nYou will probably have `react` as a `peerDependencies` and as a `devDependecy` of the Styleguide. If you use `npm i`, it will create a symlink to your Styleguide package in your \"Consumer\" `node_modules`.\n\nThe thing is in this shared package, you also have a `node_modules`. So when your shared modules requires, let's say `react`, Webpack will resolve it to the version in your Styleguide's `node_modules`, and not your Consumer's `node_modules`. Hence the duplicated `react` in your final bundles.\n\nYou can tell Webpack how to resolve the `react` of your Styleguide to use the version in your Next.js app like that:\n\n```diff\nconst withTM = require('@module-federation/next-transpile-modules')(['styleguide']);\n\nmodule.exports = withTM({\n  webpack: (config, options) => {\n+   if (options.isServer) {\n+     config.externals = ['react', ...config.externals];\n+   }\n+\n+   config.resolve.alias['react'] = path.resolve(__dirname, '.', 'node_modules', 'react');\n\n    return config\n  },\n});\n```\n\nPlease note, the above [will only work](https://github.com/zeit/next.js/issues/9022#issuecomment-610255555) if `react` is properly declared as `peerDependencies` or `devDependencies` in your referenced package.\n\nIt is not a great solution, but it works. Any help to find a more future-proof solution is welcome.\n","readmeFilename":"README.md"}