All Questions
67
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
571
views
How use nice-select2?
Link to the plugin https://github.com/bluzky/nice-select2/tree/master
I can't connect nice-select 2, I added css and js files from the dist folder to my project, connected them and wrote a line from ...
0
votes
2
answers
243
views
Misplaced link and meta tags in Pug templates when using webpack (prismic cms)
I'm working on a project where I'm using webpack to bundle my assets and process my JavaScript files. The project uses Pug (formerly known as Jade) as the templating engine for generating HTML. ...
0
votes
1
answer
115
views
How to link pages in Webpack 5 + Pug?
I have a basic webpack template with pug-loader. I have an entry pug file. When I develop on dev server, I need working link to another page (also written in pug). How can I do that? Should I compile ...
0
votes
1
answer
59
views
How to set the correct path to files connected via URL in SCSS
Problem with image/icon file paths connected in scss using:
background: url(../images/bg-blue.svg);
When setting outputPath in the plugin :
new PugPlugin({
pretty: true,
css: {
enabled:...
1
vote
0
answers
159
views
Webpack 5 require JSON as `asset/resource` instead of `asset/source`
I am trying to load a JSON file in my HTML (pug):
link(rel="manifest" href=require("/meta/webmanifest.json"))
But the href gets replaced with the contents of the JSON:
<link ...
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
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
273
views
How to build TypeScript/JavaScript code by Webpack which will be executed in the Pug pre-processor?
I want to build some TypeScript code by Webpack and make it available inside Pug inline code like:
-
const { formatNumberWith4KetaKanji } = global.__EXPORTS_FROM_LIBRARY__;
const test = 1;
...
1
vote
1
answer
347
views
webpack -Error: Cannot find module 'pug' after hitting get-api
after configuring webpack in express and then an new folder fomed but when
i run bundle.js it successfully give a meassage- server is running on port 3000
bout when i hit api http://localhost:3000/...
0
votes
2
answers
438
views
webpack-pug js function is not a function
Im new to webpack and pug . Working on a small task and
I wrote a function dropDown() in drop.js exported it in index.js file,
tried to put it in PUG file
but:
console writing wether 'function is ...
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
768
views
how to caching javascript file
I have a large web application that was built about 9-8 years ago with "pug" technology, and in recent years pages have been added in an innovative framework (vue.js)
Now in any transition ...
1
vote
0
answers
317
views
js and css file path are not loaded by webpack5 when used with pug
I'm using pug and scss with webpack 5. I have kept main.js and main.css both bundled by webpack but still the path is not resolved tried specific js path in src folder but same thing, they are not ...
1
vote
0
answers
105
views
How to automatically include PUG mixins in entry page?
Project: Webpack (js, cass, pug). Repo link
My task is to convert all imports in the project to automatic. For CSS and JS, I followed the recommendations from the official Webpack website and in my ...