Va1 / string-replace-loader

Replace loader for Webpack
MIT License
250 stars 57 forks source link

Replace failed (strict mode) : $VERSION → hello #46

Closed zhaofang closed 4 years ago

zhaofang commented 6 years ago
   {
                    test: /NotifyRules\.js$/,
                    loader: 'string-replace-loader',
                    options: {
                        search: '$VERSION',
                        replace: 'hello',
                        strict:true
                    }
                },
Va1 commented 4 years ago

there may be many causes to this behavior.

if it does not throw in strict mode, then the replacement was performed, but as the query is not regex w/ g flag, it was only for the first entry. this is just a suggestion, w/o code and/or further details i can't say much.

i'm closing it for now, let me know if it is still an issue for you and i should reopen.

cheers