Questions tagged [pug-loader]
pug-loader is a webpack module used to compile Pug or Jade into HTML.
pug-loader
89
questions
3
votes
2
answers
69
views
What is the order loaders applying in Webpack?
I am trying to setup the loading of .pug files by Webpack depending on interim filename extension, herewith it should be default one. In my case, the files which names ends with .vue.pug must me ...
0
votes
1
answer
330
views
WEBPACK Error: Child compilation failed: Module build failed (from ./node_modules/pug-loader/index.js):
ERROR in Error: Child compilation failed:
Module build failed (from ./node_modules/pug-loader/index.js):
TypeError: options must be an object
at Function.validateOptions (C:\Users\user\Desktop\WEB\...
0
votes
0
answers
153
views
Cypress can't find Pug module even though Vue finds it just fine
I searched through all the web and seems like no one ever had a problem with Pug while testing with Cypress. Anyone?
I'm using Pug with Vue 3.
The following error originated from your test code, not ...
0
votes
0
answers
141
views
Can't extract html, css, js and images from pug file [webpack]
I'm using pug v2.0.4, webpack v5.75.0 and node v14.15.4 for dev reasons. This is the interested code:
---
title: "Core - Dashboard Builder"
classSidebarHome: active
pageTitle: "...
0
votes
1
answer
211
views
Is there a way to define text within a div as plain text in pug?
I'm not that experienced in using pug and I'm trying to find a way to ignore specific parts of my text as it is presenting errors when compiling. Below is an example of what I am trying to ignore.
...
0
votes
1
answer
510
views
Webpack - linking other Pug pages on webpack-dev-server doesn't work
I'm rebuilding my own website and I want to add some transitions between pages.
In this example I have two pug files in my src folder:
In index.pug I have a line of code ( a(href='./about') Go to ...
2
votes
1
answer
683
views
Build `html/index.pug` into `dist/index.html` using Webpack 5
I'd like to build html/index.pug into dist/index.html using Webpack 5.
With Webpack 4 I used to use file-loader for this, but it seems deprecated in Webpack 5: no mentions of it in the Loaders page. ...
1
vote
1
answer
664
views
Optional chaining to add a "data-attribute" on PugJS
I am looking for a solution to add "optional chaining" on PugJS to set data-active="true" if i === 0.
Bellow is my current code. This code is working, but the problem with this ...
0
votes
1
answer
61
views
img(src=require(...)) generates ugly html
I have written pug-file with the next content:
img(src=require("../../assets/icons/icon.png"))
And try to build it to html by Webpack by using the next webpack config:
module: {
rules:...
0
votes
0
answers
236
views
NPM PUG Error Generating HTML Files - "This is related to npm not being able to find a file"
I purchased an HTML5 template and the files need to be compiled with NodeJS. I have no experience with NodeJS and I'm running into errors. I'll provide everything I think is relevant but please let me ...
0
votes
1
answer
3k
views
Read data using pug and Vue in a loop
In Vue template, I have this html in pug syntax
<template lang="pug">
div
- var cards = [{ title: 'Mountain View' },{ title: 'Mountain View' }]
mixin card(title, copy, ...
0
votes
3
answers
2k
views
Why i get Not found for JavaScript file
When i want to put js file i get this error
GET http://localhost:3000/src/app.js net::ERR_ABORTED 404 (Not Found)
HTML
<!DOCTYPE html>
<html>
<head>
<title>...
2
votes
0
answers
1k
views
How to increase building speed (Webpack, Pug, SCSS)?
I have big project. I use Pug for building HTML and SASS for styles.
My project contains 35 pages with includes and mixins.
And other basic things like images, styles and scripts.
Initial building in ...
0
votes
2
answers
347
views
Why does webpack + pug generate an Entrypoint undefined = ./index.html error?
The essence of the question is this: there is a build on webpack, everything works fine with one exception: when changing PUG files.
the project is rebuilt, but the content is not updated in the ...
1
vote
1
answer
602
views
Webpack 4 and Pug not showing images
I'm having problems with my configuration of webpack and pug. Images are not displaying ( I got a 404 error )
This is: webpack.common.js
const path = require("path");
const ...