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

---
title: webpack | daily.dev
description: Webpack 5.107 takes the first step toward native HTML module handling in core, letting JS imports of .html files resolve img, link, style, and script...
canonical: https://daily.dev/posts/webpack-npgvgncyw
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.107 takes the first step toward native HTML module handling in core, letting JS imports of .html files resolve img, link, style, and script...
og:url: https://daily.dev/posts/webpack-npgvgncyw
og:image: https://api.daily.dev/og/posts/npgvgncYW.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.107 takes the first step toward native HTML module handling in core, letting JS imports of .html files resolve img, link, style, and script references without html-loader (full html-webpack-plugin-style entry points are planned for the next release). The release also adds experimental TypeScript support via Node's built-in type-stripping, so simple .ts/.cts/.mts files compile without ts-loader or swc-loader (no type checking, JSX, or non-erasable syntax like enums). Other additions include scope hoisting for CSS Modules, a strict pure mode for CSS Modules, @value usable in @import and url(), multiple export aliases via exportsConvention, new linkInsert and orderModules hooks for CSS, preserved defer/source import phases on externals, a #__NO_SIDE_EFFECTS__ annotation for better tree shaking, and module-sync added to default resolver conditions.

## Full article

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

## Questions this post answers

### How do I enable native HTML module handling in webpack 5.107 without html-loader?

Set experiments.html to true in webpack.config.js, then import an .html file from JavaScript; the default export is the processed HTML string with img src, link href, inline style, and script src references resolved through webpack's normal pipeline. This replaces the html-loader role, though using an .html file directly as a webpack entry is not yet supported in version 5.107.

_Track experimental webpack features like this on daily.dev before wiring them into a build._

### Can webpack compile TypeScript files without ts-loader?

Yes, webpack 5.107 adds an experiments.typescript flag that compiles .ts, .cts, and .mts files directly through Node.js's built-in module.stripTypeScriptTypes, requiring no external loader. It only erases types, with no type checking, no JSX or .tsx support, and no non-erasable syntax like enum, namespace, or decorator metadata; use tsc --noEmit or fork-ts-checker-webpack-plugin for type checking, or ts-loader/swc-loader for JSX.

_Compare build tool options like this before deciding how to handle TypeScript in your bundler._

### What does the module-sync resolver condition change in webpack 5.107?

Webpack 5.107 adds module-sync to the default conditionNames right before module in the condition chain for the ESM, CJS, AMD, worker, wasm, and build-dependency resolvers, aligning with Node.js's module-sync community condition for synchronously-loadable ESM. Packages that publish a module-sync export condition in their package.json are now picked up automatically with no extra configuration.

_Keep tabs on resolver and dependency behavior changes like this on daily.dev before upgrading webpack._

## Similar posts on daily.dev

- [webpack](https://daily.dev/posts/webpack-xfuofstyh) · webpack · 7 upvotes · 5 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
- [Native JSON modules are finally real](https://daily.dev/posts/native-json-modules-are-finally-real-zkdi3tmao) · Matt Smith · 23 upvotes · 2 comments
- [Module Federation 2.0 Reaches Stable Release with Wider Support Outside of Webpack](https://daily.dev/posts/module-federation-2-0-reaches-stable-release-with-wider-support-outside-of-webpack-dwxostajk) · InfoQ · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#typescript](https://daily.dev/tags/typescript), [#webpack](https://daily.dev/tags/webpack)

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

```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-npgvgncyw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/webpack-npgvgncyw"},"datePublished":"2026-08-23T12:23:23.229Z","dateModified":"2026-08-23T12:49:20.026Z","description":"Webpack 5.107 takes the first step toward native HTML module handling in core, letting JS imports of .html files resolve img, link, style, and script...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","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-npgvgncyw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,typescript,webpack","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-npgvgncyw#faq","mainEntity":[{"@type":"Question","name":"How do I enable native HTML module handling in webpack 5.107 without html-loader?","acceptedAnswer":{"@type":"Answer","text":"Set experiments.html to true in webpack.config.js, then import an .html file from JavaScript; the default export is the processed HTML string with img src, link href, inline style, and script src references resolved through webpack's normal pipeline. This replaces the html-loader role, though using an .html file directly as a webpack entry is not yet supported in version 5.107. Track experimental webpack features like this on daily.dev before wiring them into a build."}},{"@type":"Question","name":"Can webpack compile TypeScript files without ts-loader?","acceptedAnswer":{"@type":"Answer","text":"Yes, webpack 5.107 adds an experiments.typescript flag that compiles .ts, .cts, and .mts files directly through Node.js's built-in module.stripTypeScriptTypes, requiring no external loader. It only erases types, with no type checking, no JSX or .tsx support, and no non-erasable syntax like enum, namespace, or decorator metadata; use tsc --noEmit or fork-ts-checker-webpack-plugin for type checking, or ts-loader/swc-loader for JSX. Compare build tool options like this before deciding how to handle TypeScript in your bundler."}},{"@type":"Question","name":"What does the module-sync resolver condition change in webpack 5.107?","acceptedAnswer":{"@type":"Answer","text":"Webpack 5.107 adds module-sync to the default conditionNames right before module in the condition chain for the ESM, CJS, AMD, worker, wasm, and build-dependency resolvers, aligning with Node.js's module-sync community condition for synchronously-loadable ESM. Packages that publish a module-sync export condition in their package.json are now picked up automatically with no extra configuration. Keep tabs on resolver and dependency behavior changes like this on daily.dev before upgrading webpack."}}]}
```

