ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

Should Webpack Sibling Loaders be peerDependencies or dependencies?


#1

Any advice on handling peerDependencies for loaders?

Should sibling loaders be dependencies or peerDependencies?

I’m maintaining this project: https://github.com/justin808/bootstrap-sass-loader

It’s similar to https://github.com/gowravshekar/bootstrap-webpack/

Here’s what bootstrap-weback does

  "dependencies": {
    "css-loader": "~0.6.3",
    "less-loader": "~0.6.2",
    "style-loader": "~0.6.0"
  },
  "peerDependencies": {
    "bootstrap": ">=3.0.2"
  }

Here’s what I did:

  "dendendencies": {},
  "peerDependencies": {
    "bootstrap-sass": "*",
    "css-loader": "*",
    "sass-loader": "*",
    "style-loader": "*",
    "url-loader": "*",
    "imports-loader": "*",
    "file-loader": "*"
  }

For sure bootstrap-sass should be a peerDependency. What about sibling loaders?