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 5765b58 commit 4291617
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 780 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
46 changes: 21 additions & 25 deletions spec/dummy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,15 @@
},
"private": true,
"dependencies": {
"@babel/core": "7.17.9",
"@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7",
"@babel/preset-react": "^7.10.4",
"@babel/runtime": "7.17.9",
"@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",
"nps": "^5.10.0",
"null-loader": "^4.0.0",
"prop-types": "^15.7.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand All @@ -46,25 +27,40 @@
"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",
"shakapacker": "8.0.0",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "5.3.1",
"url-loader": "^4.0.0",
"webpack": "5.72.0",
"webpack-assets-manifest": "5",
"webpack-cli": "4",
"webpack-merge": "5"
},
"devDependencies": {
"@babel/core": "7.17.9",
"@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7",
"@babel/preset-react": "^7.10.4",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@rescript/react": "^0.13.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-helmet": "^6.1.5",
"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",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.1.3",
"file-loader": "^6.2.0",
"mini-css-extract-plugin": "^2.4.4",
"null-loader": "^4.0.0",
"react-refresh": "^0.11.0",
"resolve-url-loader": "^3.1.1",
"sass": "^1.43.4",
"sass-loader": "^12.3.0",
"sass-resources-loader": "^2.1.0",
"style-loader": "^3.3.1",
"url-loader": "^4.0.0",
"webpack-dev-server": "^4.9.0"
},
"browser": {
Expand Down
Loading

0 comments on commit 4291617

Please sign in to comment.