# Webpack Demo Stuck Using Default Token?

**URL:** <https://community.cesium.com/t/webpack-demo-stuck-using-default-token/32708>\
**Category:** CesiumJS\
**Created:** [June 5, 2024, 6:29pm UTC](https://community.cesium.com/t/webpack-demo-stuck-using-default-token/32708 "2024-06-05T18:29:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_s](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chris_s/32/14000_2.png) [@chris\_s](https://community.cesium.com/u/chris_s)\
**Post date:** [June 5, 2024, 6:29pm UTC](https://community.cesium.com/t/webpack-demo-stuck-using-default-token/32708/1 "2024-06-05T18:29:43Z")

</div>

So I am just starting out, and in the CesiumJS tutorial it said I had to get webpack setup so I could serve local files. So I went to the demo , [Cesium Webpack 5 link](https://github.com/CesiumGS/cesium-webpack-example/tree/main/webpack-5) and grabbed it to see how it works. Before I did any of the npm builds or anything I de-commented the Ion.defaultAccessToken line in index.js and pasted in the string value from my account.

I tried adding a Cesium. before the Ion.defaultAccessToken line on a clean version and it didn’t matter, got the same error.

When I do NPM start it works just fine, but I get the banner at the bottom saying I’m using the default access key? What gives?

Maybe I’m totally misunderstanding this, but from what the documentation seemed to imply. If I want to do localhost development, I have to use webpack or something similar? I’m not a new developer, but have never done web dev (for reasons like this lol)

---

<div class="post-metadata">

**Author:** ![jjspace](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jjspace/32/4102_2.png) [@jjspace](https://community.cesium.com/u/jjspace)\
**Post date:** [June 7, 2024, 6:04pm UTC](https://community.cesium.com/t/webpack-demo-stuck-using-default-token/32708/3 "2024-06-07T18:04:58Z")

</div>

Hey @chris_s! Thanks for the question, sorry you’re running into issues getting set up.

You do not _have_ to use Webpack but I would recommend some sort of build system (webpack, vite, esbuild, etc) if you’re planning to build an application that’s more than a single file/page and want to take advantage of separating functions and classes and logic between multiple files. If you follow our [quickstart](https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/) for CesiumJS and just put the first code example in an html file it should work by itself without webpack.

That said, the Webpack 5 example should “just work” out of the box, even if you provide your own ion token. I tried this myself with a fresh clone of the example repo and it’s working and doesn’t show the “default token” message. The only other thing I had to change is add `Ion` as an import at the top of the file because it’s not there by default (because it’s not used unless you uncomment that line, I might change this).

```js
import {
  Viewer,
  Cartesian3,
  Math,
  Terrain,
  createOsmBuildingsAsync,
  Ion // <-- this line
} from "cesium";

```

but without that the app should just show a white screen so I’m a little confused how you had it running regardless.

Would you be able to share the full `index.js` file you’re using if that change still doesn’t get it to work?
