Commit d3c1731c authored by Maël Nison's avatar Maël Nison Committed by Joe Haddad

Adds the PnP plugin by default (#8653)

* Adds the PnP plugin by default

* Covers loaders

* Fixes linting
parent 0c6c1f9e
......@@ -10,6 +10,8 @@ import resolve from 'next/dist/compiled/resolve/index.js'
import path from 'path'
import crypto from 'crypto'
import webpack from 'webpack'
// @ts-ignore: Currently missing types
import PnpWebpackPlugin from 'pnp-webpack-plugin'
import {
DOT_NEXT_ALIAS,
......@@ -153,6 +155,7 @@ export default async function getBaseWebpackConfig(
[DOT_NEXT_ALIAS]: distDir,
},
mainFields: isServer ? ['main', 'module'] : ['browser', 'module', 'main'],
plugins: [PnpWebpackPlugin],
}
const webpackMode = dev ? 'development' : 'production'
......@@ -443,6 +446,7 @@ export default async function getBaseWebpackConfig(
'node_modules',
...nodePathList, // Support for NODE_PATH environment variable
],
plugins: [PnpWebpackPlugin],
},
// @ts-ignore this is filtered
module: {
......
......@@ -96,6 +96,7 @@
"mkdirp": "0.5.1",
"node-fetch": "2.6.0",
"path-to-regexp": "2.1.0",
"pnp-webpack-plugin": "1.5.0",
"prop-types": "15.7.2",
"prop-types-exact": "1.2.0",
"raw-body": "2.4.0",
......
......@@ -10835,6 +10835,13 @@ pn@^1.1.0:
resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==
pnp-webpack-plugin@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.5.0.tgz#62a1cd3068f46d564bb33c56eb250e4d586676eb"
integrity sha512-jd9olUr9D7do+RN8Wspzhpxhgp1n6Vd0NtQ4SFkmIACZoEL1nkyAdW9Ygrinjec0vgDcWjscFQQ1gDW8rsfKTg==
dependencies:
ts-pnp "^1.1.2"
posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
......@@ -13584,6 +13591,11 @@ tryer@^1.0.0:
resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==
ts-pnp@^1.1.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.4.tgz#ae27126960ebaefb874c6d7fa4729729ab200d90"
integrity sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw==
tslib@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment