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 76e5519
Show file tree
Hide file tree
Showing 5 changed files with 751 additions and 674 deletions.
7 changes: 5 additions & 2 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ const config: KnipConfig = {
'@rescript/react',
// The Babel plugin fails to detect it
'babel-plugin-transform-react-remove-prop-types',
// Temporary!
'.*',
// The below dependencies are not detected by the Webpack plugin
// due to the config issue.
'expose-loader',
'imports-loader',
'sass-resources-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
5 changes: 0 additions & 5 deletions spec/dummy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"@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",
Expand All @@ -25,14 +23,11 @@
"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",
"nps": "^5.10.0",
"null-loader": "^4.0.0",
"prop-types": "^15.7.2",
Expand Down
Loading

0 comments on commit 76e5519

Please sign in to comment.