> _Webpack_ bundles everything imported in the entrypoint.
If you look at `dist/main.js` content, you will notice that **the code corresponding to `welcome.js`, `game.js` and `score.js` is missing** because these files are still imported with a `<script>` tag in `index.html` rather than an `import` statement in `main.js`, so _Webpack_ has just ignored them.
Earlier in this chapter, we turned `router.js` into an _ES module_. It's time to do the same for all the aforementioned `*.js` files.
After this chapter, thanks to the _ES modules_, there will be no more imported files in the `index.html`.
**ES `import` statements will be the glue between files**. With the _bundler_, the importing file responsibility have shifted from _HTML_ to _JS_ files.
=== "before bundler"

=== "after bundler"

## :fontawesome-brands-js: **Bundle the JS** code <span id="diy">:fontawesome-solid-wrench: Do it yourself</span> <span id="hard">:fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: Hard</span>
- Edit `utils.js`. Look at the `TODO #export-functions` comments for instructions.
- Write an `export` statement to export the `parseUrl` function.
??? note "Show the utils.js file"
=== "utils.js"
```js linenums="1"
export function parseUrl() {
// ...
}
```
- Edit `welcome.js`, `game.js` and `score.js`. Look at the `TODO #export-functions` comments for instructions.
- Remove the _IIFE_
- Write an `export` statement to export the component's function.
- Write an `import` statement to import the `parseUrl` function if required.
??? note "Show the resulting files"
- Edit `main.js`. Look at `TODO #import-components` for instructions.
- Write an `import` statement to import `WelcomeComponent`, `GameComponent` and `ScoreComponent`
??? note "Show the main.js file"
=== "main.js"
```js linenums="1"
import { Router } from "./app/scripts/router";
import { WelcomeComponent } from "./app/scripts/welcome";
import { GameComponent } from "./app/scripts/game";
import { ScoreComponent } from "./app/scripts/score";
- Test the application: navigate to [http://localhost:8080](http://localhost:8080), the application should work as usual and show no error in the console 🎉.