Advanced Webpack Configuration for Modern JavaScript Applications
Webpack Installation and Setup
Webpack requires Node.js environment to function properly. Initialize your project and install webpack dependencies:
npm init -y
npm install webpack webpack-cli --save-dev
Webpack can be executed through different methods:
Global webpack command
npx webpack (uses local node_modules)
npm script: "build" ...
Posted on Mon, 11 May 2026 03:09:39 +0000 by cheesemunger
Understanding Vue CLI Configuration Files in Depth
When deploying a Vue application separately from the backend, the config/index.js file requires proper configuration. This file controls both development and production build behaviors.
Basic Configuration Structure
var path = require('path')
module.exports = {
build: {
index: path.resolve(__dirname, 'dist/index.html'),
assetsRoot: p ...
Posted on Sat, 09 May 2026 09:35:11 +0000 by nick1
Setting Up a Webpack Project for TypeScript Video Player Development
Run npm init -y in an empty project directory to generate a base package.json manfiest.
Install Webpack core and CLI as local development dependencies:
pnpm add -D webpack webpack-cli
Create a webpack.config.js file in the project root. This configuration file runs in a Node.js environment, so it uses CommonJS module syntax for exports:
const ...
Posted on Sat, 09 May 2026 09:24:15 +0000 by TRI0N
Resolving 'Starting the development server...' Hang in Webpack 5 Projects
After upgrading a project from webpack 4 to webpack 5 (webpack@^5.64.4, webpack-dev-server@^4.6.0), running npm start results in the terminal hanging at Starting the development server..., and the browser shows a blank page at localhost:3000.
Diagnosing Common Causes
Port Conflict
The default port for webpack-dev-server is 3000. Check if anothe ...
Posted on Sat, 09 May 2026 05:23:11 +0000 by sy-co
Fixing Relative Asset Paths and CSS Background URLs After Vue Build
When a Vue CLI 2 project is bundled, the default configuration assumes the generated dist folder will be served from the web root. If the app is deployed to a sub-folder, all relative links break. Two separate fixes are required: one for JavaScript-imported assets and another for CSS url() references.
1. Adjust the base public path
Open config/ ...
Posted on Sat, 09 May 2026 00:50:36 +0000 by miniu
Implementing Automatic Browser Cache Busting in Vue Applications
Deployment Caching Challenges
When releasing updates to production, users often encounter stale resources due to aggressvie browser caching. Even when code changes, static assets might load from local storage without hitting the server. To resolve this, implement asset fingerprinting during the build process.
JavaScript and CSS Fingerprinting
B ...
Posted on Fri, 08 May 2026 16:32:32 +0000 by inkfish