---
# System prepended metadata

title: '2006-FSA-RM-WEB-FT Cookie Jar: Webpack, Frontend Modules, SPAs, AJAX'

---

# 2006-FSA-RM-WEB-FT Cookie Jar: Webpack, Frontend Modules, SPAs, AJAX

## Why do we have to set the mode to development for webpack?

There is a production mode and a development mode. Development mode is a "less optimized" version. It will just help you run whatever you need to run.

However, when ready to release to production, you will want to probably optimize the build. It will take a little bit more time but Webpack will make sure that it will optimize it as best for production. It will keep that build as light as lean as possible.

[Webpack Mode Documentation](https://webpack.js.org/configuration/mode/)

## How is trip planner seeing our index page if we never added a get rout for it?

This line in `app.js`

```javascript=
app.use(express.static(path.join(__dirname, "..", "public")))
```

We use static middleware to expose our static files inside the public directory.
We will also go over this again in Juke today!