<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/webpack-pzfjqoalb" -->

---
title: webpack | daily.dev
description: Webpack 5.108 introduces an experimental universal target that compiles a single bundle adaptable at runtime to browsers, web workers, Node.js, Electron, and...
canonical: https://daily.dev/posts/webpack-pzfjqoalb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: webpack | daily.dev
og:description: Webpack 5.108 introduces an experimental universal target that compiles a single bundle adaptable at runtime to browsers, web workers, Node.js, Electron, and...
og:url: https://daily.dev/posts/webpack-pzfjqoalb
og:image: https://api.daily.dev/og/posts/PZfjQoAlb.png
og:image:alt: webpack
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# webpack

**[webpack](https://daily.dev/sources/webpack-blog)** · 13 min read · 0 upvotes · 0 comments

## Summary

Webpack 5.108 introduces an experimental universal target that compiles a single bundle adaptable at runtime to browsers, web workers, Node.js, Electron, and NW.js, replacing manual target: ["web", "node"] setups. It also adds dedicated bun and deno targets, continues native HTML support started in 5.107 (HTML files as entry points, HTML output for JS entries, and HMR for HTML modules), and ships a large round of tree-shaking improvements including optimization.inlineExports, cross-module dead-branch skipping, cross-module purity propagation, and CommonJS re-export analysis via Object.defineProperty. Other additions include automatic ESM detection via top-level await/import.meta, modernized runtime output syntax, output.strictModuleResolution, a [uniquename] template placeholder, worker chunk filenames, and a typed defineConfig helper.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://webpack.js.org/blog/2026-06-25-webpack-5-108>

## Questions this post answers

### What does the new universal target do in webpack 5.108?

Webpack 5.108's universal target compiles a single bundle that adapts at runtime to the browser, web workers, Node.js, Electron, and NW.js, replacing hand-written target: ["web", "node"] setups. It defaults experiments.outputModule to true, sets output.globalObject to globalThis, and makes workers, externals, and CSS handling platform-aware so the same bundle runs correctly everywhere.

_Teams weighing whether to adopt universal builds can track webpack's evolving bundler config on daily.dev._

### How do I use an HTML file directly as a webpack entry point?

Enable experiments.html and point entry directly at an .html file; its <script src> and <link rel="stylesheet"> references are processed through webpack's pipelines and the emitted HTML is rewritten to reference the generated JS and CSS chunks. Webpack 5.108 also adds .html and .css to the default resolve.extensions when those experiments are enabled.

_Developers migrating build setups toward Vite-like HTML entries can follow bundler changes like this on daily.dev._

### What is optimization.inlineExports in webpack 5.108 and what does it do?

optimization.inlineExports, enabled by default in production, inlines ESM exports bound to small primitive constants (null, undefined, boolean, number, or strings up to 6 bytes) directly at every import site. This lets dead-code elimination drop unused exports and even remove entire side-effect-free modules, and it enables cross-module dead-branch skipping so unreachable imports are never bundled.

_Engineers tuning bundle size can keep up with tree-shaking improvements like this via daily.dev._

## Similar posts on daily.dev

- [webpack](https://daily.dev/posts/webpack-xfuofstyh) · webpack · 7 upvotes · 5 comments
- [Webpack 5.111](https://daily.dev/posts/webpack-5-111-mt0gmxzdi) · webpack · 6 upvotes · 1 comments
- [Webpack Publishes 2026 Roadmap with Native CSS Support, Universal Target, and Path to Version 6](https://daily.dev/posts/webpack-publishes-2026-roadmap-with-native-css-support-universal-target-and-path-to-version-6-st4ioteyv) · InfoQ · 5 upvotes · 0 comments
- [Webpack 5.110](https://daily.dev/posts/webpack-5-110-yid8nftne) · webpack · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#webpack](https://daily.dev/tags/webpack), [#deno](https://daily.dev/tags/deno)

[View this post on daily.dev](https://daily.dev/posts/webpack-pzfjqoalb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"webpack","url":"https://daily.dev/posts/webpack-pzfjqoalb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/webpack-pzfjqoalb"},"datePublished":"2026-08-23T12:23:21.408Z","dateModified":"2026-08-23T12:58:50.285Z","description":"Webpack 5.108 introduces an experimental universal target that compiles a single bundle adaptable at runtime to browsers, web workers, Node.js, Electron, and...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"webpack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"webpack","logo":"https://media.daily.dev/image/upload/s--IMWiEoiP--/f_auto,q_auto/v1787487498/logos/webpack-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/webpack-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/webpack-pzfjqoalb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,webpack,deno","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"webpack","item":"https://daily.dev/sources/webpack-blog"},{"@type":"ListItem","position":3,"name":"webpack"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/webpack-pzfjqoalb#faq","mainEntity":[{"@type":"Question","name":"What does the new universal target do in webpack 5.108?","acceptedAnswer":{"@type":"Answer","text":"Webpack 5.108's universal target compiles a single bundle that adapts at runtime to the browser, web workers, Node.js, Electron, and NW.js, replacing hand-written target: [\"web\", \"node\"] setups. It defaults experiments.outputModule to true, sets output.globalObject to globalThis, and makes workers, externals, and CSS handling platform-aware so the same bundle runs correctly everywhere. Teams weighing whether to adopt universal builds can track webpack's evolving bundler config on daily.dev."}},{"@type":"Question","name":"How do I use an HTML file directly as a webpack entry point?","acceptedAnswer":{"@type":"Answer","text":"Enable experiments.html and point entry directly at an .html file; its <script src> and <link rel=\"stylesheet\"> references are processed through webpack's pipelines and the emitted HTML is rewritten to reference the generated JS and CSS chunks. Webpack 5.108 also adds .html and .css to the default resolve.extensions when those experiments are enabled. Developers migrating build setups toward Vite-like HTML entries can follow bundler changes like this on daily.dev."}},{"@type":"Question","name":"What is optimization.inlineExports in webpack 5.108 and what does it do?","acceptedAnswer":{"@type":"Answer","text":"optimization.inlineExports, enabled by default in production, inlines ESM exports bound to small primitive constants (null, undefined, boolean, number, or strings up to 6 bytes) directly at every import site. This lets dead-code elimination drop unused exports and even remove entire side-effect-free modules, and it enables cross-module dead-branch skipping so unreachable imports are never bundled. Engineers tuning bundle size can keep up with tree-shaking improvements like this via daily.dev."}}]}
```

