462 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
34
views
Webpack does not preserve the directory structure of output HTML files
First, I'm migrating a project from gulp and from the Foundation for Sites SCSS framework to webpack and a different SCSS framework. The project makes a site for a text-heavy law school casebook.
I am ...
1
vote
1
answer
73
views
Separate JS code for multiple webpack entries
I want to create 2 separate entries in Webpack config (e.g. app1.js and app2.js) so that each entry point has its own JS and CSS code.
There are following files:
app1.js
import('./app1.css');
console....
1
vote
2
answers
96
views
Add a script at the end of HTML with HtmlWebpackPlugin
I have a React application with an index.html file in the public folder:
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<meta charset="utf-8" />
<...
1
vote
1
answer
64
views
HtmlWebpackPlugin: trying to add a script in existing index.html
In webpack.config.ts using HtmlWebpackPlugin as -
new HtmlWebpackPlugin({
template: 'IndexFile/index.html',
// inject: 'body',
templateParameters: {
...
2
votes
1
answer
69
views
Hot reloading templateParameters for HtmlWebpackPlugin
I have in my webpack.config.js:
const data = require('./src/data.json');
...
new HtmlWebpackPlugin({
template: "src/index.hbs",
filename: "index.html",
...
1
vote
1
answer
64
views
Prevent HtmlWebpackPlugin from injecting unsused `<script>` tags
I have a problem where chunks split out by SplitChunksPlugin are being injected into HTML files that does not use them.
In my config, there are 2 entry points main and jira_callback, and one ...
1
vote
1
answer
48
views
Can HtmlWebpackPlugin use only the bundles in the [name] folder?
I have a webpack.config.js that scans a config folder to build different bundles in different output folders so that each of those output folders can be a standalone website. For each of those output ...
1
vote
1
answer
337
views
Webpack --watch doesn't auto refresh when altering files
Since updating webpack to webpack 5.90.1 my auto refresh when --watch flag is set on webpack has stopped working. Requiring me to run the command manually every time I make a change to my code.
Here's ...
0
votes
1
answer
103
views
htmlWebpackPlugin.options.title error on index page - laravel
I just deployed my first laravel site to forge/digital ocean.
I am using the default site for the moment.
The index page its blank and inspecting the source this message appears: "We're sorry but ...
1
vote
1
answer
222
views
Processing .css files included inside link tags in HtmlWebpackPlugin template
Brief Description:
I am running into unexpected outputs/issues when working with .css files referenced inside <link> tag in the .html template provided to HtmlWebpackPlugin along with using ...
1
vote
0
answers
167
views
webpack HtmlWebpackPlugin add font
Hello I'm new using webpack and i'm having a problem adding a font
in the webpack.config.js I have the html template like this:
plugins: [
new ESLintPlugin(),
new HtmlWebpackPlugin({
...
2
votes
1
answer
218
views
How to handle links when using twig loader
I use twig loader to process twig files. But it doesn't handle resource links like html loader does.
There is a similar question, but the proposed solutions did not help me. When using html-loader ...
0
votes
0
answers
76
views
Webpack: Regex in html filename?
My filename in url is something like:
index.qwe123.html
Where qwe123 is a random string. I want to display index.html file regardless this string. How do I customize in Webpack config:
new ...
1
vote
1
answer
890
views
Using html partials with webpack
I'm quite new in JS and webpack and I'm trying on my project to use partials for header and footer in order to not repeat them everywhere.
My first approach was to install html-loader and use in my ...
1
vote
1
answer
493
views
HTML Webpack Plugin v5 - templateParameters
I have a small application written in Webpack using HTML Webpack Plugin: https://github.com/einazare/html-webpack-plugin-18n-generator
And I am trying to use templateParameters to pass some variables ...