462 questions
Score of 1
1 answer
44 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 ...
Score of 1
1 answer
77 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....
Score of 1
2 answers
120 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" />
<...
Score of 1
1 answer
93 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: {
...
Score of 2
1 answer
75 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",
...
Score of 1
1 answer
95 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 ...
Score of 1
1 answer
52 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 ...
Score of 1
1 answer
351 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 ...
Score of 0
1 answer
106 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 ...
Score of 1
1 answer
226 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 ...
Score of 1
0 answers
173 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({
...
Score of 2
1 answer
225 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 ...
Score of 0
0 answers
90 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 ...
Score of 1
1 answer
939 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 ...
Score of 1
1 answer
538 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 ...