Skip to content

Commit 76e5519

Browse files
committed
Try to remove unused spec/dummy dependencies
1 parent 8a91488 commit 76e5519

File tree

5 files changed

+751
-674
lines changed

5 files changed

+751
-674
lines changed

knip.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ const config: KnipConfig = {
5454
'@rescript/react',
5555
// The Babel plugin fails to detect it
5656
'babel-plugin-transform-react-remove-prop-types',
57-
// Temporary!
58-
'.*',
57+
// The below dependencies are not detected by the Webpack plugin
58+
// due to the config issue.
59+
'expose-loader',
60+
'imports-loader',
61+
'sass-resources-loader',
5962
],
6063
},
6164
},

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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
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",
@@ -25,14 +23,11 @@
2523
"css-minimizer-webpack-plugin": "^3.1.3",
2624
"expose-loader": "^1.0.3",
2725
"file-loader": "^6.2.0",
28-
"history": "^4.6.3",
2926
"imports-loader": "^1.2.0",
3027
"jquery": "^3.5.1",
3128
"jquery-ujs": "^1.2.2",
32-
"loader-utils": "^2.0.0",
3329
"lodash": "^4.17.4",
3430
"mini-css-extract-plugin": "^2.4.4",
35-
"node-libs-browser": "^2.2.1",
3631
"nps": "^5.10.0",
3732
"null-loader": "^4.0.0",
3833
"prop-types": "^15.7.2",

0 commit comments

Comments
 (0)