You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-40Lines changed: 32 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,30 +236,26 @@ First, you need to copy cMaps from `pdfjs-dist` (React-PDF's dependency - it sho
236
236
237
237
##### Webpack
238
238
239
-
Add `copy-webpack-plugin`to your project if you haven't already:
239
+
Add `copy-webpack-plugin`by executing `npm install copy-webpack-plugin --save-dev` or `yarn add copy-webpack-plugin --dev` and add the following to your Webpack config:
240
240
241
-
```
242
-
npm install copy-webpack-plugin --save-dev
243
-
```
244
-
245
-
Now, in your Webpack config, import the plugin:
246
-
247
-
```ts
248
-
importpathfrom'node:path';
249
-
importCopyWebpackPluginfrom'copy-webpack-plugin';
250
-
```
241
+
```diff
242
+
+import path from 'node:path';
243
+
+import CopyWebpackPlugin from 'copy-webpack-plugin';
251
244
252
-
and in `plugins` section of your config, add the following:
@@ -327,30 +323,26 @@ First, you need to copy standard fonts from `pdfjs-dist` (React-PDF's dependency
327
323
328
324
##### Webpack
329
325
330
-
Add `copy-webpack-plugin`to your project if you haven't already:
326
+
Add `copy-webpack-plugin`by executing `npm install copy-webpack-plugin --save-dev` or `yarn add copy-webpack-plugin --dev` and add the following to your Webpack config:
331
327
332
-
```
333
-
npm install copy-webpack-plugin --save-dev
334
-
```
335
-
336
-
Now, in your Webpack config, import the plugin:
337
-
338
-
```ts
339
-
importpathfrom'node:path';
340
-
importCopyWebpackPluginfrom'copy-webpack-plugin';
341
-
```
328
+
```diff
329
+
+import path from 'node:path';
330
+
+import CopyWebpackPlugin from 'copy-webpack-plugin';
342
331
343
-
and in `plugins` section of your config, add the following:
0 commit comments