Skip to content

Commit 2fa9516

Browse files
authored
Remove pnp-webpack-plugin (rails#21)
1 parent a20346b commit 2fa9516

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Note, in v6, most JS packages are peer dependencies. Thus, the installer will ad
136136

137137
```bash
138138
yarn add @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime babel-loader \
139-
compression-webpack-plugin pnp-webpack-plugin terser-webpack-plugin \
139+
compression-webpack-plugin terser-webpack-plugin \
140140
webpack webpack-assets-manifest webpack-cli webpack-merge webpack-sources webpack-dev-server
141141
```
142142

docs/v6_upgrade.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This means you have to configure integration with frameworks yourself, but webpa
1414
See example migration, [PR 27](https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh/pull/27).
1515

1616
### Update
17-
1. Peer dependencies. Run `yarn add @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime babel-loader compression-webpack-plugin pnp-webpack-plugin terser-webpack-plugin webpack webpack-assets-manifest webpack-cli webpack-merge webpack-sources webpack-dev-server`
17+
1. Peer dependencies. Run `yarn add @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime babel-loader compression-webpack-plugin terser-webpack-plugin webpack webpack-assets-manifest webpack-cli webpack-merge webpack-sources webpack-dev-server`
1818
2. Update your webpack config for a single config file, `config/webpack/webpack.config.js`.
1919
3. Update `babel.config.js` if you need JSX support.
2020

@@ -66,7 +66,7 @@ See example migration, [PR 27](https://github.com/shakacode/react_on_rails_tutor
6666

6767
Note, the webpacker:install will install the peer dependencies:
6868
```bash
69-
yarn add @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime babel-loader compression-webpack-plugin pnp-webpack-plugin terser-webpack-plugin webpack webpack-assets-manifest webpack-cli webpack-merge webpack-sources webpack-dev-server
69+
yarn add @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime babel-loader compression-webpack-plugin terser-webpack-plugin webpack webpack-assets-manifest webpack-cli webpack-merge webpack-sources webpack-dev-server
7070
```
7171

7272
1. There is now a single default configuration file of `config/webpack/webpack.config.js`. Previously, the config file was set

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"eslint-plugin-jsx-a11y": "^6.4.1",
4141
"eslint-plugin-react": "^7.26.0",
4242
"jest": "^27.2.1",
43-
"pnp-webpack-plugin": "^1.7.0",
4443
"webpack": "^5.53.0",
4544
"webpack-assets-manifest": "^5.0.6",
4645
"webpack-merge": "^5.8.0"

package/environments/base.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
const { basename, dirname, join, relative, resolve } = require('path')
55
const extname = require('path-complete-extname')
6-
const PnpWebpackPlugin = require('pnp-webpack-plugin')
76
const { sync: globSync } = require('glob')
87
const WebpackAssetsManifest = require('webpack-assets-manifest')
98
const webpack = require('webpack')
@@ -92,15 +91,13 @@ module.exports = {
9291
entry: getEntryObject(),
9392
resolve: {
9493
extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.coffee'],
95-
modules: getModulePaths(),
96-
plugins: [PnpWebpackPlugin]
94+
modules: getModulePaths()
9795
},
9896

9997
plugins: getPlugins(),
10098

10199
resolveLoader: {
102-
modules: ['node_modules'],
103-
plugins: [PnpWebpackPlugin.moduleLoader(module)]
100+
modules: ['node_modules']
104101
},
105102

106103
optimization: {

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,13 +3215,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0:
32153215
dependencies:
32163216
find-up "^4.0.0"
32173217

3218-
pnp-webpack-plugin@^1.7.0:
3219-
version "1.7.0"
3220-
resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.7.0.tgz#65741384f6d8056f36e2255a8d67ffc20866f5c9"
3221-
integrity sha512-2Rb3vm+EXble/sMXNSu6eoBx8e79gKqhNq9F5ZWW6ERNCTE/Q0wQNne5541tE5vKjfM8hpNCYL+LGc1YTfI0dg==
3222-
dependencies:
3223-
ts-pnp "^1.1.6"
3224-
32253218
prelude-ls@^1.2.1:
32263219
version "1.2.1"
32273220
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -3730,11 +3723,6 @@ tr46@^2.1.0:
37303723
dependencies:
37313724
punycode "^2.1.1"
37323725

3733-
ts-pnp@^1.1.6:
3734-
version "1.2.0"
3735-
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
3736-
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==
3737-
37383726
tsconfig-paths@^3.12.0:
37393727
version "3.12.0"
37403728
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b"

0 commit comments

Comments
 (0)