Skip to content

Commit

Permalink
Try to remove unused spec/dummy dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyr committed Jan 23, 2025
1 parent 8a91488 commit 6697543
Show file tree
Hide file tree
Showing 5 changed files with 771 additions and 873 deletions.
17 changes: 15 additions & 2 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,21 @@ const config: KnipConfig = {
'@rescript/react',
// The Babel plugin fails to detect it
'babel-plugin-transform-react-remove-prop-types',
// Temporary!
'.*',
// This one is weird. It's long-deprecated and shouldn't be necessary.
// Probably need to update the Webpack config.
'node-libs-browser',
// The below dependencies are not detected by the Webpack plugin
// due to the config issue.
'css-loader',
'expose-loader',
'file-loader',
'imports-loader',
'null-loader',
'sass',
'sass-loader',
'sass-resources-loader',
'style-loader',
'url-loader',
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/webpack/commonWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const sassLoaderConfig = {
const scssConfigIndex = baseClientWebpackConfig.module.rules.findIndex((config) =>
'.scss'.match(config.test),
);
baseClientWebpackConfig.module.rules[scssConfigIndex].use.push(sassLoaderConfig);
baseClientWebpackConfig.module.rules[scssConfigIndex]?.use.push(sassLoaderConfig);

// add jquery
const exposeJQuery = {
Expand Down
6 changes: 0 additions & 6 deletions spec/dummy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@
"@hotwired/turbo-rails": "^8.0.4",
"@rescript/react": "^0.13.0",
"babel-loader": "8.2.4",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"compression-webpack-plugin": "9",
"core-js": "3",
"create-react-class": "^15.6.3",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.1.3",
"expose-loader": "^1.0.3",
"file-loader": "^6.2.0",
"history": "^4.6.3",
"imports-loader": "^1.2.0",
"jquery": "^3.5.1",
"jquery-ujs": "^1.2.2",
"loader-utils": "^2.0.0",
"lodash": "^4.17.4",
"mini-css-extract-plugin": "^2.4.4",
"node-libs-browser": "^2.2.1",
Expand All @@ -46,7 +41,6 @@
"redux-thunk": "^2.2.0",
"regenerator-runtime": "^0.13.4",
"rescript": "^11.1.4",
"resolve-url-loader": "^3.1.1",
"sass": "^1.43.4",
"sass-loader": "^12.3.0",
"sass-resources-loader": "^2.1.0",
Expand Down
Loading

0 comments on commit 6697543

Please sign in to comment.