I am using html-loader to load my html template and file-loader to load my images that are in the template. This run just fine in dev but when I run build:prod and run the output, I get a template parse error.
It appears that all angular2…
I'm trying to output individual html files from pug templates in my webpack project. The problem I'm having is in getting pug-loader to render html into the files.
My webpack.config:
const path = require('path');
const glob = require('glob');
const…
I'm working on an angular application which requires html files to be extracted as plain HTML files and at same time should check for any to require those images (as assets). In addition, images are based upon root path (so…
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',
options: {
minimize: true,
},
…
I spent hours on a basic webpack configuration but I'm still not able to make it work. My aim is to perform the parsing of a html template as you import it in a JavaScript file. It looks like a common use-case, but there should be something odd in…
Is there a way to include html partial inside another partial using webpack?
I am using html-loader to do this:
index.html
<%= require('html-loader!./partials/_header.html') %>
But when I try to include another partial inside a _header.html it is…
I have a problem with loading an image using webpack.
When I use an image tag on an html page, everything works fine:
But I also have a need to use inline styles:
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 import my directive templates into the…
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 doc that you can specify others attribute, which…
I want to use webpack with css-loader with option 'localIdentName' and of course to use the hash of class names
but I'm not use React or a like libraries for DOM
my webpack rules
{
test: /\.scss$/,
use: [
{ loader: 'style-loader' },
…
I have following projects tree
some-project
some-project.component.ts
some-project.html
index.ts
webpack.conf.js
another-project
another-project.component.ts
anpther-project.html
index.ts
webpack.conf.js
I'm running…
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 folder and running the below webpack.dev.js from…
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 template strings, allowing you to import other html…