Giter Club home page Giter Club logo

Comments (6)

shirishp avatar shirishp commented on June 12, 2024 1

@derekshull @inzanez I have created a new issue with a possible workaround - #31

from string-replace-loader.

Va1 avatar Va1 commented on June 12, 2024 1

sorry for the delayed reply. this was caused by the bug when options being overwritten, while they should remain immutable. fixed in v2.0.0 released recently

from string-replace-loader.

itsMattShull avatar itsMattShull commented on June 12, 2024

+1 on this.

    {
        test: /\.(js|vue)$/,
        loader: 'string-replace-loader',
        enforce: 'pre',
        query: {
          search: '__API__',
          replace: 'https://localhost:8082',
          flags: 'g'
        }
      }

from string-replace-loader.

inzanez avatar inzanez commented on June 12, 2024

@derekshull: Maybe as a workaround:
node_modules/string-replace-loader/index.js:
I changed line 7:
options.search = new RegExp(options.search, options.flags);
to
options.search = new RegExp('__API__', 'g');

I know it's not a fix but it works for meantime ;-)

from string-replace-loader.

cdll avatar cdll commented on June 12, 2024

+1 on this.
i've also tried

        query: {
          search: '@@basepath'
          ,replace: './public'
          ,flags: 'g'
        }

and

        query: {
          multiple:[
            {
              search: '@@basepath'
              ,replace: './public'
              ,flags: 'g'
            }
        }

both failed

from string-replace-loader.

beautifulBoys avatar beautifulBoys commented on June 12, 2024

everyone: try this "webpack-replace-loader" .
this loader wrote by me.

from string-replace-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.