• Webpack is a "module bundler". On its own it does not change the source of a program (note: there are some caveats to this, e.g. minification), only join all the different bits of a large codebase together for easier and more efficient delivery over the Internet (depending on the use case; you may be bundling server-side code, in which case the benefits are mostly around being able to consolidate build tooling).
  • A webpack loader is used to process files during bundling. It is specific to webpack (you would not use babel-loader without webpack, except maybe in cases of interop with other build tools, but even then it would not be used on its own).
  • In a webpack configuration one specifies a mapping of file extensions to webpack loaders. For example, a common case is to process .ts files using ts-loader. This way, webpack will pass off files with the .ts extension to the TypeScript compiler, and use the output of this compilation in the bundle, instead of the source program.
  • Babel is a compiler; it takes an ESNext program and produces an equivalent ES3+ compatible program.
  • babel-loader does what ts-loader does for TypeScript; passes off files to the Babel compiler, and returns the result to be used in the bundle in-place of the original source program.

Isn't transpiling and bundling is a separate process?

Yes. That is why we have "webpack the bundler", and "Babel the compiler/transpiler", and babel-loader to connect the two together. Without babel-loader webpack would not be able to process files through Babel.

Hope that helps.

Answer from sdgluck on Stack Overflow
🌐
npm
npmjs.com › package › babel-loader
babel-loader - npm
babel module loader for webpack. Latest version: 10.1.1, last published: 4 months ago. Start using babel-loader in your project by running `npm i babel-loader`. There are 18568 other projects in the npm registry using babel-loader.
      » npm install babel-loader
    
Published   Mar 09, 2026
Version   10.1.1
🌐
GitHub
github.com › babel › babel-loader › releases
Releases · babel/babel-loader
📦 Babel loader for webpack. Contribute to babel/babel-loader development by creating an account on GitHub.
Author   babel
Discussions

why babel-loader is part of webpack instead babel itself?
I am learning about how build system works in JavaScript. If babel-loader is transpiler that translates React to JavaScript, why is it part of webpack plugin? Isn't transpiling and bundling is a More on stackoverflow.com
🌐 stackoverflow.com
Do you guys compile with ts-loader or babel-loader?
ts-loader only. It does most of what babel-loader does, but babel-loder has perf issues Edit: don’t be scared to use babel-loader though guys, I’m talking about a large project (500+ files), and it’s pretty easy to switch out More on reddit.com
🌐 r/typescript
30
31
December 24, 2021
Are Babel and Webpack used often TOGETHER or is it 'one or the other'?
Webpack is capable of doing all kinds of preprocessing on files. Babel converts es6 code. Webpack has a kind of plug-in system called "loaders". Each loader can do a different kind of preprocessing. So babel-loader is one instance of a webpack loader someone wrote that uses babel, but there are also lots of other kinds of loaders like react-loader, css-loader, etc. Also, usually these loaders are based on standalone libraries because webpack isn't the only bundling option out there. So for example I'm pretty sure you can use babel on it's own to process files. There are other preprocessors like grunt, gulp, rollup, broccoli, etc. and they all have their own separate babel based plugins and plugin ecosystem. More on reddit.com
🌐 r/learnjavascript
3
17
July 30, 2018
Is babel needed with webpack anymore?
I'd bundle them still for: minimizing Libraries might not support modules as they are More on reddit.com
🌐 r/webpack
3
8
April 7, 2022
🌐
Medium
medium.com › @agzuniverse › webpack-and-babel-what-are-they-and-how-to-use-them-with-react-5807afc82ca8
Webpack and Babel — What are they, and how to use them with React. | by Aswin G | Medium
December 20, 2019 - Loaders are plugins for Webpack that are used for preprocessing files before they are bundled by webpack. For .js and .jsx files, we tell Webpack to use babel-loader which makes Webpack run these files through Babel before bundling them.
Top answer
1 of 1
13
  • Webpack is a "module bundler". On its own it does not change the source of a program (note: there are some caveats to this, e.g. minification), only join all the different bits of a large codebase together for easier and more efficient delivery over the Internet (depending on the use case; you may be bundling server-side code, in which case the benefits are mostly around being able to consolidate build tooling).
  • A webpack loader is used to process files during bundling. It is specific to webpack (you would not use babel-loader without webpack, except maybe in cases of interop with other build tools, but even then it would not be used on its own).
  • In a webpack configuration one specifies a mapping of file extensions to webpack loaders. For example, a common case is to process .ts files using ts-loader. This way, webpack will pass off files with the .ts extension to the TypeScript compiler, and use the output of this compilation in the bundle, instead of the source program.
  • Babel is a compiler; it takes an ESNext program and produces an equivalent ES3+ compatible program.
  • babel-loader does what ts-loader does for TypeScript; passes off files to the Babel compiler, and returns the result to be used in the bundle in-place of the original source program.

Isn't transpiling and bundling is a separate process?

Yes. That is why we have "webpack the bundler", and "Babel the compiler/transpiler", and babel-loader to connect the two together. Without babel-loader webpack would not be able to process files through Babel.

Hope that helps.

🌐
webpack
docs.webpack.js.org › loaders › babel-loader
babel-loader - webpack
March 5, 2026 - babel-loader allows transpiling JavaScript files using Babel and webpack.
🌐
Babel
babeljs.io › setup
Babel
Create a babel.config.json config in your project root and enable some presets.
Find elsewhere
🌐
webpack
webpack.js.org › loaders › babel-loader
babel-loader | webpack
When set, each Babel transform output will be compressed with Gzip. If you want to opt-out of cache compression, set it to false -- your project may benefit from this if it transpiles thousands of files. customize: Default null. The path of a module that exports a custom callback like the one that you'd pass to .custom(). Since you already have to make a new file to use this, it is recommended that you instead use .custom to create a wrapper loader.
🌐
Snyk
security.snyk.io › snyk vulnerability database › npm
babel-loader | Snyk
The npm package babel-loader receives a total of 23,456,246 downloads a week.
🌐
Babel
babeljs.io › config options
Options · Babel
These options are only allowed as part of Babel's programmatic options, so they are primarily for use by tools that wrap around Babel, or people calling babel.transform directly. Users of Babel's integrations, like babel-loader or @babel/register are unlikely to use these.
🌐
Reddit
reddit.com › r/typescript › do you guys compile with ts-loader or babel-loader?
r/typescript on Reddit: Do you guys compile with ts-loader or babel-loader?
December 24, 2021 -

I'm bundling with webpack and normally I use ts-loader for ts files and babel for js

{
	test: /\.jsx?$/,
	use: 'babel-loader',
	exclude: /node_modules/
},
{
	test: /\.tsx?$/,
	use: 'ts-loader',
	exclude: /node_modules/
}

But I've noticed a lot of tutorial use babel-loader for both and just adding @babel/preset-typescript to .babelrc

{
    test: /\(.jsx?|.tsx?)$/,
    use: 'babel-loader',
    exclude: /node_modules/
 },

 //.babelrc
   plugins: ["@babel/preset-env", "@babel/preset-typescript"]

Do y'all go for approach #1, #2 or something else entirely?

🌐
npm
npmjs.com › package › @kyfe › babel-loader
@kyfe/babel-loader - npm
June 26, 2023 - babel module loader for webpack. Latest version: 7.1.5, last published: 3 years ago. Start using @kyfe/babel-loader in your project by running `npm i @kyfe/babel-loader`. There are no other projects in the npm registry using @kyfe/babel-loader.
      » npm install @kyfe/babel-loader
    
Published   Jun 26, 2023
Version   7.1.5
🌐
Robin Wieruch
robinwieruch.de › webpack-babel-setup-tutorial
How to Webpack 5 with Babel - Setup Tutorial - Robin Wieruch
October 30, 2020 - By using Babel, the code which isn’t supported yet, will get transpiled back to vanilla JavaScript so that every environment (e.g. browser) can interpret it. In order to get Babel running, you need to install two of its main dependencies on the command line: ... Moreover, in case you have Webpack in place to bundle your JavaScript application, you will have to install a Webpack Loader for Babel:
🌐
Babel
babeljs.io › presets › @babel/preset-env
@babel/preset-env · Babel
Generally caller data will be specified in the bundler plugins (e.g. babel-loader, @rollup/plugin-babel) and thus it is not recommended to pass caller data yourself -- The passed caller may overwrite the one from bundler plugins and in the future you may get suboptimal results if bundlers supports ...
🌐
Poki
poki.com › en › g › babel-tower
Babel Tower - Play Online for Free! | Poki
Babel Towerby Airapport · 169.6KLike · 24.5KDislike · Report a bug · We’ll be back after this short break · Preparing... Kiwi Clicker · The Final Earth 2Level DevilThe Third Piglet's TowerSurvival BuilderIdle AntsHome Builder ClickerDigger EscapeDuck Merge · Ball vs BlockSea CatcherIdle Digging TycoonIdle Spinner Factory BuilderStack CitySatisbox BuilderCoin FactoryMarble Run SimulatorRubble TroubleTruck Loader 5Cozy Room DesignDino MinerMonkey MartIdle Mining EmpireEggsplosionIdle Lumber IncIdle CowshedCat Clicker REFight and LootRoller Coaster Builder 2Spacebar ClickerCow BayMy Perfect HotelCozy Garden Design ·
🌐
Medium
mike-diaz006.medium.com › what-i-learned-at-work-this-week-package-webpack-babel-and-plugins-e91b380e464f
What I Learned at Work this Week: package, webpack, Babel, and plugins | by Mike Diaz | Medium
January 18, 2021 - Under rules we have test, which lets us decide which files qualify for bundling. In this case we use regex to specify files that end with .js. In exclude, we declare that we do not want to bundle our node_modules. Use is where we bring Babel into the picture by setting our loader as babel-loader.
🌐
Medium
fortunemuhumuza.medium.com › demystifying-webpack-loaders-a-deep-dive-into-babel-loader-c5ed205fad2c
Demystifying Webpack Loaders: A Deep Dive into Babel Loader | by Fortun | Medium
November 18, 2024 - Webpack, on the other hand, doesn’t understand JavaScript syntax directly — it simply takes input files and processes them using loaders and plugins. Babel Loader integrates Babel into Webpack’s build pipeline, allowing you to transpile JavaScript code while bundling your project.
🌐
Reddit
reddit.com › r/learnjavascript › are babel and webpack used often together or is it 'one or the other'?
r/learnjavascript on Reddit: Are Babel and Webpack used often TOGETHER or is it 'one or the other'?
July 30, 2018 -

I know what Babel does but I see tutorial videos on Webpack and it seems that it is Webpack which backdates the code to pre-ES5 and it miniaturises it as well. It was unclear whether that is something which you need Babel for so Webpack can do it automatically or if Webpack has that feature built-in independent from Babel and it's a matter of picking one tool or the other to ensure your code works on such-and-such an edition of IE.

Again, I am aware of what each tool accomplishes. But not how they both work together, if they work together, and which tool has what particular duty when they are being used. It's all very abstract. How do professional developers use Babel and Webpack, if they decide to?

🌐
HeyLink
heylink.me › NisyaBabel
HeyLink.me | BABELTOTO
LINK BABEL MEDIA · Share link · https://aksesbabel.com/login.php?utm_medium=social&utm_source=heylink.me · Share on Social · Share on Facebook · Share via Telegram · Share on Twitter · Share on LinkedIn · Share via Email · Just one link for everything.