Ember + Vite
To run this demo, ./start.sh
NOTE: This demo exists solely because Vite support isn't yet merged into Embroider, so this is how to use Vite with Ember, but mostly how to use a fork of a monorepo with Ember that happens to provide Vite which we much prefer over Webpack.
To make your own Ember + Vite app
ember new my-app
package.json
and application.hbs
yarn
or npm
or pnpm
to install the default dependenciesember-cli-build.js
- return app.toTree();
+ const { Vite } = require('@embroider/vite');
+ return require('@embroider/compat').compatBuild(app, Vite, {
+ extraPublicTrees: [],
+ staticAddonTestSupportTrees: true,
+ staticAddonTrees: true,
+ staticHelpers: true,
+ staticComponents: true,
+ });
This differs from the normal instructions for an embroider app because in order to use Vite, we must already have maximum static analyzeability. 3. add the following to your package.json
"@embroider/compat": "*",
"@embroider/core": "*",
"@embroider/vite": "*",
start.sh
from this repo and place it one directory above your appstart.sh my-app
(name of your app folder)