Giter Site home page Giter Site logo

Comments (6)

gregl83 avatar gregl83 commented on August 16, 2024 1

I'm having the same issue, any luck?

from interpolate-html-plugin.

Mindo21 avatar Mindo21 commented on August 16, 2024 1

And it worked for me! Just make sure that you do not use spaces in the workspace folders.

from interpolate-html-plugin.

jice-lavocat avatar jice-lavocat commented on August 16, 2024

I'm facing the same issue, and I'm a bit stuck. Any hint on how to solve this ?
I'm trying to use it in images like so:
index.html
<img src="assets/%lang%/image.png">
webpack.config.js (extract)

new HtmlWebPackPlugin({
        template: "./src/index.html",
        filename: index.html,
      }),

...

new InterpolateHtmlPlugin({
        'LANG': 'en'
      })

Output:
Module not found: Error: Can't resolve './assets/%lang%/image.png'

from interpolate-html-plugin.

Drafter500 avatar Drafter500 commented on August 16, 2024

@tanzaho Did you try to make 'LANG' in lower case so that it matches exactly with the template?

from interpolate-html-plugin.

Mindo21 avatar Mindo21 commented on August 16, 2024

Well, it seems that you just have to make sure that the names of folders in your app do not contain spaces...

from interpolate-html-plugin.

MagnusBrzenk avatar MagnusBrzenk commented on August 16, 2024

I gave up on trying to use this package directly and used the version supplied by create-react-app, which is in react-dev-utils/InterpolateHtmlPlugin. You can examine how create-react-app uses it by running npm run eject.

from interpolate-html-plugin.

Related Issues (13)

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.