Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using with react-app-rewired #29

Open
ajayep opened this issue Sep 6, 2019 · 1 comment
Open

using with react-app-rewired #29

ajayep opened this issue Sep 6, 2019 · 1 comment

Comments

@ajayep
Copy link

ajayep commented Sep 6, 2019

Hi,

I am trying out ifdef-loader with react-app-rewired.

Below are the contents of my config-overrides.js file
`

module.exports = function override(config, env) {
console.log('override!');

const opts = {
    PRODUCTION:false,
    DEBUG: true,
    "ifdef-verbose": true
 };
  
let loaders = config.module.rules[2].oneOf;

loaders.splice(loaders.length - 1, 0, {
    test: /\.js$/,
    use: [
        { loader: "echo-loader?msg=dump" },  
        { loader: "ifdef-loader", options: opts } 
     ]
});

return config;

};`

When I dump the files being processed by echo-loader I see my files are not getting processed

dump.txt

Any clues on how I can get it working with react-app-rewired ?

Cheers
Ajay

@nippur72
Copy link
Owner

nippur72 commented Sep 6, 2019

in dump.txt I don't see any // #ifdef directives that have to be processed with ifdef-loader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants