Comments (6)
I'm having the same issue, any luck?
from interpolate-html-plugin.
And it worked for me! Just make sure that you do not use spaces in the workspace folders.
from interpolate-html-plugin.
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.
@tanzaho Did you try to make 'LANG' in lower case so that it matches exactly with the template?
from interpolate-html-plugin.
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.
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)
- Docs are misleading HOT 1
- is it dead? what about webpack 4? HOT 1
- Unable to access VARIABLE inside index.html file
- TypeError: Cannot read property 'tap' of undefined when used with html-webpack-plugin 4.0.1 HOT 2
- Inability to work with webpack@5 and html-webpack-plugin@^4.5.0 HOT 1
- Add ts support ?
- Missing dependency: html-webpack-plugin
- upgrade HOT 3
- Support for nested objects HOT 4
- webpack 4 support HOT 15
- Cannot read property 'tap' of undefined HOT 2
- TypeError: Cannot read property 'compilation' of undefined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interpolate-html-plugin.