Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
184 views

Issue I'm creating a project with Electron Forge and webpack. I added a 'public' directory to my project, and a HTML-loader plugin to resolve the imports in the HTML files. Some parts of my webpack ...
Yoojun Zhou's user avatar
1 vote
1 answer
225 views

Brief Description: I am running into unexpected outputs/issues when working with .css files referenced inside <link> tag in the .html template provided to HtmlWebpackPlugin along with using ...
jam's user avatar
  • 37
0 votes
0 answers
89 views

My filename in url is something like: index.qwe123.html Where qwe123 is a random string. I want to display index.html file regardless this string. How do I customize in Webpack config: new ...
aryan's user avatar
  • 25
1 vote
1 answer
923 views

I'm quite new in JS and webpack and I'm trying on my project to use partials for header and footer in order to not repeat them everywhere. My first approach was to install html-loader and use in my ...
Floran's user avatar
  • 59
0 votes
2 answers
1k views

I want to open an html file which is in my local, in a new tab on button click in react component. I am trying to import the html file and then use window.open() method of javascript for this purpose. ...
Tanvi Narkhede's user avatar
1 vote
2 answers
2k views

I want to load a HTML file with Next JS and html-loader, but I have this error message : Module parse failed: Unexpected token (2:2) You may need an appropriate loader to handle this file type, ...
SanB's user avatar
  • 109
0 votes
1 answer
936 views

I am setting webpack but I have an error. It happens when I try to use html-loader, what I do when I set rules in the module in webpack.config.js file. It says there is an error in child compilation. ...
Emilie Tossan's user avatar
0 votes
1 answer
1k views

I'm working on a static site project, and have to now add multiple pages using the same header and footer. I'm trying to do this by turning the header.html and footer.html files into partials. I've ...
jerome's user avatar
  • 411
0 votes
2 answers
2k views

I have a react app, which i make thought create-react-app. I want to make here a link, that will refer to project.html file. I tried to make something like this: const Portfolio = (props) => { ...
Gleb's user avatar
  • 13
2 votes
1 answer
2k views

The Webpack documentation on module.rules is quite sparse: [Rule] An array of Rules which are matched to requests when modules are created. These rules can modify how the module is created. They can ...
AxD's user avatar
  • 3,366
6 votes
4 answers
10k views

I recently upgraded to Webpack 5 and my html-loader no longer loads svg files and inlines them. Here's my svg rule in webpack { test: /\.svg$/, use: [ { loader: 'html-loader', ...
Christian Pavilonis's user avatar
0 votes
1 answer
353 views

I just get this problem recently , but I can't figure out what is wrong with my webpack setting. Every time I save my SCSS files (./src/scss/) change, and webpack do refresh the page (it is hot module ...
Mizok.H's user avatar
  • 463
1 vote
0 answers
303 views

this is my first time using Webpack and I have a problem with it. I get error message ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:0) when I put image ...
CodeHada's user avatar
0 votes
1 answer
849 views

when i use html-loader and file loader then in development mode image in not dispaly on browser images in src->assets->images folder and in html file please suggest me what i can do to run the ...
Sadanand Masurkar's user avatar
0 votes
2 answers
715 views

I'm trying to run a hello world app in Angular 12 + webpack 5. When I try to add html-loader (as all the guides say i should), I get the error below. Why does this happen? and how can I fix it? If ...
Preston's user avatar
  • 8,275
2 votes
1 answer
922 views

This is my config file, I have tried with html-loader it works fine for .html files but i’m now trying to learn and use handlebarsjs its not working the same. I've also tried using the preprocessor ...
Victor's user avatar
  • 23
1 vote
0 answers
1k views

I encountered the following problems when configuring webpack. How can I solve them? I want to use my own index.html file. My configuration file follows, the error message is at the bottom: webpack....
tony's user avatar
  • 11
3 votes
0 answers
694 views

I'm using setup from getting-started webpack page: const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-...
Bojan Vukasovic's user avatar
3 votes
0 answers
2k views

I am learning webpack js; following an example where the trainer loads an html page from src folder to a destination (dist) folder. I am trying the same thing but on Webpack5. I have created a config ...
Ahmed's user avatar
  • 3,290
0 votes
1 answer
555 views

I must be missing something because there seems to be almost no documentation about parsing anchor tags in webpack. For example if I want to hash the name of html files which are linked to in my ...
caleba's user avatar
  • 140
2 votes
1 answer
3k views

<!DOCTYPE html> <html lang=""> <head> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title><%= htmlWebpackPlugin....
Most Wanted's user avatar
  • 7,279
11 votes
3 answers
4k views

I'm using webpack and it's file-loader + html-loader to emit files into my output directory. It works almost as expected, because it also duplicates those files. Here is a part of my webpack.config.js ...
David Malášek's user avatar
1 vote
1 answer
1k views

I am trying to convert the html file that would contain absolute paths in src. I found a similar problem in the webpack documentation. I try to use html-loader with extract-loader but gets an error. ...
grzgrz's user avatar
  • 11
0 votes
1 answer
101 views

I need to create an array of div (with the image inside). My code so far: let slides = sliderData.map(() => { let advantagesList = advantages.map((adv) => { return( <li key={adv....
Vlad Kalenikov mad_man7's user avatar
0 votes
1 answer
2k views

I'm using ReactJS to build a site, and I want to create a link (a href="relativepath") to a local HTML file so that when the user clicks on the link, it'll open up the html page. The local ...
Phillip's user avatar
0 votes
1 answer
1k views

I'm trying to import static html components in my templates, I've this structure: /src/home.html.ejs /src/parts/header.html /src/parts/breadcrumbs.html /src/home.html.ejs body <%= require('./...
Frunky's user avatar
  • 385
1 vote
1 answer
6k views

so i get this error in my webpack code when trying to compile it, this happens when i start in production mode and when i delete html-loader the error is gone, i also include HtmlWebpackPlugin and ...
Joel Fernando's user avatar
0 votes
0 answers
271 views

I've configured [email protected] (with [email protected]) to work with html-webpack-plugin (plus [email protected] and [email protected]): const path = require('path'); const HtmlWebpackPlugin = ...
rslemos's user avatar
  • 2,862
0 votes
1 answer
1k views

I want to import a html file and convert into json. const DocHtml = require('../../Shared/assests/index.html'); const template = { __html: DocHtml }; webpack.config.js module.exports = { module: { ...
Govinda Malavipathirana's user avatar
0 votes
1 answer
855 views

Is there any reasons why the alias below does not work in HTML tags or work in JavaScript? In my webpack config file: resolve: { alias: { '~': path.resolve(__dirname, './src/') } }, ...
Run's user avatar
  • 57.7k
1 vote
1 answer
1k views

I use the Webpack with html-loader, but since they removed the interpolation option my old projects can't follow the updates. There are serveral projects, so it would be too much effort to upgrade all ...
netdjw's user avatar
  • 6,161
0 votes
0 answers
139 views

I have implemented html-loader on my Webpack configuration file: module: { rules: [ { test: /\.html$/i, exclude: /(node_modules)/, use: ['html-loader'], ...
Ron Rofe's user avatar
  • 797
1 vote
0 answers
478 views

Has anyone gotten Webpack/html-loader to handle image references in anchor tags (href attribute)? I'm using the following webpack config that throws the error "Callback was already called" ...
Aaron's user avatar
  • 53
18 votes
3 answers
16k views

I was learning webpack and I came across loaders,The defination of loaders says that it transform your code,so that it can be included inside the javascript bundle. But,How html-loader works? The ...
user8989's user avatar
  • 678
1 vote
2 answers
2k views

I've set up aliases in my webpack config file. It works fine for JS, CSS imports and img src attributes. However I'd like to build a gallery in the HTML file with the standard lightbox setup: <a ...
csisy's user avatar
  • 540
2 votes
1 answer
3k views

I'm trying to build static html pages with webpack 4. I'm using html-webpack-plugin. I want to define some header.html and footer.html and import them later in all html pages. But I want also then my ...
Pavel Kizernis's user avatar
3 votes
0 answers
313 views

In version 1.0.0 of Webpack's html-loader, the interpolate option has been deprecated, in favour of preprocessor (according to their changelog). interpolate enabled interpolation syntax for ES6 ...
leoncvlt's user avatar
  • 385
0 votes
1 answer
1k views

I have a Webpack 4 project to make a multi language admin-dashboard with this folder and file structure: admin-dashboard | |--build | |--assets | | |--img | | |--font | |--fa | | |--index....
Aspian's user avatar
  • 2,105
1 vote
0 answers
456 views

When I tried to webpack my project, I'm getting this error <link rel=stylesheet href=[object Object]> my expected output for CSS styles ./styles.css. I'm new to webpack, Can anyone please help ...
Vamsi Krishna's user avatar
4 votes
1 answer
2k views

I've got an AngularJS (v.1.7) app served by Rails. I just moved from Sprockets to Webpack. While trying to migrate my Jasmine tests to Jest. I ran into an issue with html-loader which I'm using to ...
mr rogers's user avatar
  • 3,260
4 votes
2 answers
1k views

I'm using webpack with html-loader to create an assets folder inside my dist folder. But I'm trying to implement lazy loading on images by changing src attribute with a data-src link. I found in the ...
ElliotYoYo's user avatar
1 vote
0 answers
320 views

I’m trying to use DefinePlugin with html-loader. I’m using interpolation in html-loader, and trying to use values from DefinePlugin in the interpolated expressions. This works when I load into ...
NReilingh's user avatar
  • 1,958
2 votes
1 answer
1k views

I am moving a project that used grunt across to webpack. I am using HTML snippets a lot to reuse HTML components across various files. For HTML includes that do not require passing of variables I am ...
user2115620's user avatar
1 vote
1 answer
2k views

I have two entries in my webpack.config.js. One for the JS and one for the SCSS. I can run in development and product mode. If i create a production build I get the following files: index.html, main[...
The M's user avatar
  • 661
13 votes
3 answers
9k views

I'm trying to set up a modern vanilla web starter with Webpack. I got stuck when I added webpack-html-loader and html-loader. Here's what happens... When I make use of an img tag in the entry index....
Victor Ofoegbu's user avatar
18 votes
3 answers
7k views

I am doing a project with webpack4 from scratch. But when I try to display an image in an HTML file, I face a weird problem: After npm run build, the src of image tag is built as <image src="[...
Nelson's user avatar
  • 209
2 votes
1 answer
2k views

I'm making a website with multiple entry points. With the following structure. index.html products index.html product1 index.html I'm using file-loader to load the images on the js files. Here's my ...
Diego Farfan's user avatar
2 votes
2 answers
5k views

I'm planning to use Webpack for a project and I'm setting up my workflow with Html-loader + file-loader to get a production html file with dynamic src for the images, as Colt Steele teaches in this ...
Jorge Pasco's user avatar
0 votes
1 answer
1k views

I'm getting several SVG's that are all structured like this: <?xml version="1.0" encoding="utf-8"?> <svg> ... <g id="cabin"> <g id="1"> <g id="a"...
Matthias's user avatar
  • 4,211
1 vote
1 answer
3k views

I have googled a lot, but I didn't find a clear solution to my question. Both my xxx.sass and index.html will reference the same xxx.png from images folder. But the webpack resolved to the wrong ...
Charlie's user avatar
  • 2,303