Skip to content

Commit

Permalink
docs(vue): add transpileDependencies note
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Oct 18, 2023
1 parent 6104461 commit 8c29b16
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Documentation/content/docs/vtk_vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ Now install vtk.js as a dependency.
$ npm install @kitware/vtk.js
```

## Configure your project

`@kitware/vtk.js` targets ES6+ output, which means if you are intending to target ES5 browsers, you must
tell vue-cli to transpile `@kitware/vtk.js`. Update your `vue.config.js` file to look like the following
snippet below. Visit the [vue-cli documentation](https://cli.vuejs.org/config/#transpiledependencies) for
more info.

```js
module.exports = defineConfig({
...
// If you want to transpile all dependencies:
transpileDependencies: true,

// If you selectively transpile dependencies:
transpileDependencies: ["@kitware/vtk.js"],
});
```

## Using vtk.js in your app

To add a minimal vtk.js example to your app, replace `src/components/HelloWorld.vue` with the following contents.
Expand Down

0 comments on commit 8c29b16

Please sign in to comment.