Skip to main content

Questions tagged [pug-loader]

pug-loader is a webpack module used to compile Pug or Jade into HTML.

pug-loader
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 ...
Takeshi Tokugawa YD's user avatar
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\...
ToyTrexx's user avatar
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 ...
jean d'arme's user avatar
  • 4,265
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: "...
Salvatore Riccardi's user avatar
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. ...
cope's user avatar
  • 11
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 ...
Marius Gardelli's user avatar
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. ...
Blue Nebula's user avatar
  • 1,026
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 ...
Nuno Marques's user avatar
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:...
Elena Larina's user avatar
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 ...
RidicCoder's user avatar
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, ...
Steve's user avatar
  • 4,093
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>...
AndreiN's user avatar
  • 47
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 ...
dannyfromtheblock's user avatar
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 ...
Oleg Sergeichik's user avatar
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 ...
Fede's user avatar
  • 1,696

15 30 50 per page
1
2 3 4 5 6