Im using webpacks html-loader in combination with pug-html-loader, and its working fine for img tags with src attributes.
However if I have a div with an inline style="background-image: url()" attribute, the image referenced there is not…
When using html-loader, the tag in the index.html did not trigger url-loader. Here's my webpack configs & html:
webpack config
// webpack config
module.exports = {
entry: {
"index": path.join(__dirname, "./src/js/app.js"),
…
I have the following config for my pug files...
{
test: /\.pug$/,
loaders: ["pug-html"]
}
This works great now I want to add an image that I load using url-loader. My structure is like this
src
...
thing
thing.template.pug
…
For some reason I currently don't understand, webpack does not bundle my HTML files into the bundles it generates. It bundles everything else, but sadly not my HTML files.
I'm using Angular 2, and have included a dependency on:
"html-loader":…
I use webpack to build an angular project. My webpack configuration is copied from another project, where it works successfully.
But in my project it won't include .html templates into the resulting javascript bundle.
Here's the part of webpack…
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 tag src in this way. I add a period before the…
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.config.js:
module: {
rules: [
{
…
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.
html file -> simple.html
index js file :
import…
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 file-loader to use :
webpack.prod.js:
const path =…
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 of them to the new way.
Is there any way to use…
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" when the commented line below is included:
const path =…
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:
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 output js and css files automatically inject to…
When I tried to webpack my project, I'm getting this error my expected output for CSS styles ./styles.css.
I'm new to webpack, Can anyone please help me to solve this issue. Thanks in advance.
Here are…
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 HtmlWebpackPlugin, or when html-loader is the only…