cogear.js icon indicating copy to clipboard operation
cogear.js copied to clipboard

How to modify webpack config?

Open gryzzly opened this issue 5 years ago • 1 comments

The docs say: "You can edit it in your project to customize Webpack behavior.", but adding webpack.prod.js to the root of my project doesn’t seem to affect effective webpack config.

Config files both for production and development modes are located into the main cogear package root:

./cogear
├── LICENCE.md
├── README.md
├── bin
├── lib
├── node_modules
├── package.json
├── postcss.config.js
├── webpack.common.js  # <= Common config shared between production and development
├── webpack.dev.js     # <= Development config
└── webpack.prod.js    # <= Production config

All in all it's usual Webpack config. You can edit it in your project to customize Webpack behavior.

gryzzly avatar Mar 27 '19 13:03 gryzzly

It seems like you can only modify the webpack config from within plugins: https://cogearjs.org/docs/plugins. That's the only way I've been able to at least

stowball avatar Apr 25 '19 07:04 stowball