arackaf / customize-cra

Override webpack configurations for create-react-app 2.0
MIT License
2.78k stars 268 forks source link

Overriding optimization in config-override.js #216

Open lostAlready opened 4 years ago

lostAlready commented 4 years ago

I am trying to override config.optimization but it doesn't seem to work. Is this supposed to work or there is another way to override? Thanks

This is what I have:

module.exports = override(
    config => ({
        ...config,
        output: {
        ...config.output,
        globalObject: 'this',
        },
        optimization: {
            ...config.optimization,
            moduleIds: 'hashed'
        }
    }));
mesutyigit commented 4 years ago

Did you solve it?

+up