# how to write a es6 class extend Cesium.viewer

**URL:** <https://community.cesium.com/t/how-to-write-a-es6-class-extend-cesium-viewer/8529>\
**Category:** CesiumJS\
**Created:** [August 7, 2019, 9:54am UTC](https://community.cesium.com/t/how-to-write-a-es6-class-extend-cesium-viewer/8529 "2019-08-07T09:54:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xc\_z](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/xc_z/32/2146_2.png) [@xc\_z](https://community.cesium.com/u/xc_z)\
**Post date:** [August 7, 2019, 9:54am UTC](https://community.cesium.com/t/how-to-write-a-es6-class-extend-cesium-viewer/8529/1 "2019-08-07T09:54:38Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

I am developing a project using es6

I want to write a class extend Cesium.viewer

my code snippet is below

**2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.**

```auto
import Viewer from "cesium/Source/Widgets/Viewer/Viewer"
class EasyViewer extends Viewer {
    constructor(container, options) {
        super(container, options);
    }
}
export default EasyViewer;

```

**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

I create a project using vue

**4. The Cesium version you’re using, your operating system and browser.**

cesium version is 1.16.0

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [August 7, 2019, 8:19pm UTC](https://community.cesium.com/t/how-to-write-a-es6-class-extend-cesium-viewer/8529/2 "2019-08-07T20:19:26Z")

</div>

You may need to use a wrapper to get this work. While there isn’t an official one, there are some community ones like: [https://www.npmjs.com/package/vue-cesium](https://www.npmjs.com/package/vue-cesium)

You may also find this article helpful on what it takes to get CesiumJS working in webpack: [https://cesium.com/docs/tutorials/cesium-and-webpack/#add-cesiumjs-to-a-webpack-app](https://cesium.com/docs/tutorials/cesium-and-webpack/#add-cesiumjs-to-a-webpack-app)
