Skip to content

Commit a24219f

Browse files
committed
Revert "Merge pull request #3 from transcom/I-12947-Node-Canvas"
This reverts commit 3075ee1, reversing changes made to 2a443ae.
1 parent b5c8195 commit a24219f

File tree

5 files changed

+6
-9504
lines changed

5 files changed

+6
-9504
lines changed

.github/workflows/webpack.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@ jobs:
2424

2525
- name: Build
2626
run: |
27-
if [ "${{ matrix.node-version }}" == "18.x" ]; then
28-
export NODE_OPTIONS=--openssl-legacy-provider
29-
fi
3027
npm install
3128
npx webpack

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"scripts": {
1212
"dev": "webpack -d --watch",
13-
"build": "webpack --mode production --progress",
13+
"build": "webpack -p --progress",
1414
"start": "node ./scripts/start.js",
1515
"lint": "eslint --ext js,jsx src",
1616
"test": "jest --env=jsdom ",
@@ -68,6 +68,7 @@
6868
"inquirer": "^7.2.0",
6969
"jest": "^26.1.0",
7070
"lint-staged": "^10.2.11",
71+
"node-sass": "^8.0.0",
7172
"postcss-loader": "^4.2.0",
7273
"prettier": "^2.0.5",
7374
"react": "^16.6.3",
@@ -77,15 +78,14 @@
7778
"style-loader": "^1.2.1",
7879
"url-loader": "^4.1.0",
7980
"webpack": "^5.75.0",
80-
"webpack-bundle-analyzer": "^3.8.0",
81+
"webpack-bundle-analyzer": "^4.10.2",
8182
"webpack-cli": "^3.3.12",
82-
"webpack-dev-server": "^3.11.0"
83+
"webpack-dev-server": "^5.0.4"
8384
},
8485
"dependencies": {
8586
"pdfjs-dist": "1.8.357",
8687
"prop-types": "^15.5.10",
8788
"react-visibility-sensor": "^5.0.2",
88-
"sass": "^1.77.2",
8989
"three": "0.137.0"
9090
},
9191
"resolutions": {

src/components/drivers/pdf-viewer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import VisibilitySensor from 'react-visibility-sensor'
55
import { PDFJS } from 'pdfjs-dist/build/pdf.combined'
66
import 'pdfjs-dist/web/compatibility'
77

8+
PDFJS.disableWorker = true
89
const INCREASE_PERCENTAGE = 0.2
910
const DEFAULT_SCALE = 1.1
1011
// eslint-disable-next-line no-import-assign

webpack.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Modified work Copyright 2020, Trussworks, Inc.
33

44
const path = require('path')
5-
const { experiments } = require('webpack')
65

76
const BUILD_DIR = path.resolve(__dirname, './dist')
87
const APP_DIR = path.resolve(__dirname, './src')
@@ -12,7 +11,6 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
1211

1312
const config = {
1413
entry: `${APP_DIR}/components`,
15-
mode: 'production',
1614
output: {
1715
path: BUILD_DIR,
1816
filename: 'index.js',
@@ -23,7 +21,7 @@ const config = {
2321
modules: [path.resolve(__dirname, './src'), 'node_modules'],
2422
extensions: ['.js', '.jsx', '.json'],
2523
},
26-
plugins: [new BundleAnalyzerPlugin({analyzerMode: 'disabled'})],
24+
plugins: [new BundleAnalyzerPlugin()],
2725
externals: [
2826
{
2927
react: {
@@ -85,9 +83,6 @@ const config = {
8583
},
8684
],
8785
},
88-
experiments: {
89-
topLevelAwait: true,
90-
},
9186
}
9287

9388
module.exports = config

0 commit comments

Comments
 (0)