Skip to content

Commit 5a461fe

Browse files
committed
Try to remove unused spec/dummy dependencies
1 parent b766f50 commit 5a461fe

File tree

4 files changed

+40
-1132
lines changed

4 files changed

+40
-1132
lines changed

knip.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,22 @@ const config: KnipConfig = {
5252
'@rescript/react',
5353
// The Babel plugin fails to detect it
5454
'babel-plugin-transform-react-remove-prop-types',
55-
// Temporary!
56-
'.*',
55+
// This one is weird. It's long-deprecated and shouldn't be necessary.
56+
// Probably need to update the Webpack config.
57+
'node-libs-browser',
58+
// The below dependencies are not detected by the Webpack plugin
59+
// due to the config issue.
60+
'css-loader',
61+
'expose-loader',
62+
'file-loader',
63+
'imports-loader',
64+
'mini-css-extract-plugin',
65+
'null-loader',
66+
'sass',
67+
'sass-loader',
68+
'sass-resources-loader',
69+
'style-loader',
70+
'url-loader',
5771
],
5872
},
5973
},

spec/dummy/config/webpack/commonWebpackConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const sassLoaderConfig = {
2424
const scssConfigIndex = baseClientWebpackConfig.module.rules.findIndex((config) =>
2525
'.scss'.match(config.test),
2626
);
27-
baseClientWebpackConfig.module.rules[scssConfigIndex].use.push(sassLoaderConfig);
27+
baseClientWebpackConfig.module.rules[scssConfigIndex]?.use.push(sassLoaderConfig);
2828

2929
// add jquery
3030
const exposeJQuery = {

spec/dummy/package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,19 @@
1515
"@hotwired/turbo-rails": "^8.0.4",
1616
"@rescript/react": "^0.13.0",
1717
"babel-loader": "8.2.4",
18-
"babel-plugin-macros": "^3.1.0",
19-
"babel-plugin-module-resolver": "^4.0.0",
2018
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
2119
"compression-webpack-plugin": "9",
2220
"core-js": "3",
2321
"create-react-class": "^15.6.3",
2422
"css-loader": "^6.5.1",
25-
"css-minimizer-webpack-plugin": "^3.1.3",
2623
"expose-loader": "^1.0.3",
2724
"file-loader": "^6.2.0",
28-
"history": "^4.6.3",
2925
"imports-loader": "^1.2.0",
3026
"jquery": "^3.5.1",
3127
"jquery-ujs": "^1.2.2",
32-
"loader-utils": "^2.0.0",
3328
"lodash": "^4.17.4",
3429
"mini-css-extract-plugin": "^2.4.4",
3530
"node-libs-browser": "^2.2.1",
36-
"nps": "^5.10.0",
3731
"null-loader": "^4.0.0",
3832
"prop-types": "^15.7.2",
3933
"react": "^19.0.0",
@@ -46,7 +40,6 @@
4640
"redux-thunk": "^2.2.0",
4741
"regenerator-runtime": "^0.13.4",
4842
"rescript": "^11.1.4",
49-
"resolve-url-loader": "^3.1.1",
5043
"sass": "^1.43.4",
5144
"sass-loader": "^12.3.0",
5245
"sass-resources-loader": "^2.1.0",

0 commit comments

Comments
 (0)