dbelyaeff / cogear.js

Modern static websites generator (Node.JS/Webpack)

Home Page:https://cogearjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to modify webpack config?

gryzzly opened this issue · 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.

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