Can`t change webpackConfig file in Theia extension browser-app module

I want to add some webpack plugin in browser-app webpack config?
If, I run “theia build” The modification has removed automatically.
It would be highly appreciated if you could help me on this issue.

[original thread by Madasamy]

Hi @madasamy, you can provide an alternative webpack configuraiton using -c option for theia, i.e. theia start -c mywepback-config.js

Since webpack config exports js object, your configuration can import the generated configuration, mutate it and reexport. As it is done here for example:


Thanks @anton-kosyakov, I will try with that approach.


Its Showing error “: webpack exited with an unexpected code: 1.
at ChildProcess. (path\node_modules@theia\application-manager\lib\appl”


I am using command “theia build -c my-webpack,config.js”

yes, it should work like that

do you have any other errors?

is there a way to see your webpack config?


Yes, const genConfig = require(’./webpack.config.js’)
const merge = require(‘webpack-merge’);
const perpspectivePath = ‘path/node_modules/@omega/perspective/dist’;

module.exports ={

plugins: [
new CopyPlugin([
{ from: perpspectivePath, to: ‘ms-monorepo’ }
}, genConfig);


It showing error as “Unknown argument: c”

try –config


–config is working now

strange -c supposed to be an alias for –config. Anyway glad it works for you.


Thanks @anton-kosyakov