This is Ember application running only on Vite.
- It's
TypeScript'ed by default. - It uses
viteto build the app. tailwindused for styling.playwrightused for testing.
Main difference with classic Ember application is that we don't trying to automatically resolve addons and it's dependencies - we just import them directly, only once needed.
This application does not use ember-cli or embroider at all.
- 🚀 Hot Module Replacement support
- ⚡️ No complex build process
- 💡 Instant Server Start
- 🛠️ Rich customization features
- 📦 Optimized Build
- 🔩 A lot of supported addons
- 🔑 TypeScripted by default
- 🍀 Playwright tests
- Hot Module Replacement
- Strict mode
- Ember-Data support
- Lazy-loading for routes
- Template-only components
- Style imports from components
- Ember Inspector
- Template imports support (
.gts&.gjs) - Glint support
- Testing support (QUnit)
- Template linting
- Playwright testing
yarn install
yarn dev
# open http://localhost:4200ember-simple-authember-bootstrapember-concurrencyember-intlember-concurrency-decoratorsember-render-modifiersember-truth-helpersember-basic-dropdownember-power-selectember-style-modifierember-assign-helperember-element-helperember-page-titleember-notifyember-ref-bucketember-modal-dialogember-responsiveember-event-helpers
This is not complete list, and you could add any ember addon you want (if it don't have ember-cli logic)
I would like to bulletproof opinion, that modern ember application could be statically resolvable by default, and I would like to use Vite for that. It give as ability to use TypeScript and ESM by default, and it's very fast.
I'm not planning to actively maintain this repo, but if you have any questions, feel free to ask.
In addition, if you looking for options to improve speed of your ember project and you open for contracts - don't shy to contact me.
PR's are welcome.
- Install dependency
yarn add addon-name. - Create
addon-name.tsfile insrc/addonsfolder. - Import needed
helpers,modifiers,components,servicesfromaddon-name(check samples in same folder).
We should keep extensions while importing, don't forget to check correct path's from
node_modules/addon-namefolder.
Do not forget to
setComponentTemplatefor components.
import SayHello from 'addon-name/components/my-component.js';
import SayHelloTemplate from 'addon-name/templates/my-component.hbs';
import CalcHelper from 'addon-name/helpers/calc.js';
import SummaryModifier from 'addon-name/modifiers/summary.js';
import SomeService from 'addon-name/services/some-service.js';
import { setComponentTemplate } from '@glimmer/manager';
setComponentTemplate(SayHelloTemplate, SayHello);- Create registry object for addon (check samples in same folder)
const registry = {
'component:say-hello': SayHello,
'helper:calc': CalcHelper,
'modifier:summary': SummaryModifier,
'service:some-service': SomeService,
}- Export registry object in
addon-name.tsfile
export default registry;- Import created registry object in
src/addons/index.tsfile
import AddonName from './addon-name';
const registry = {
// ... other addons
...AddonName,
}Now we have new addon in our project. It should work out of the box for classic ember components. If you need to use it from gts / gjs files - you should import it as classic dependency inside gts / gjs file.
Note: If you have
aliasing/babelproblems - add newAddontovite.config.tsfile (check samples in same file)
As we see, it's quite easy to redefine any part of addon, including component name, and it should be an easy way to fix possible breakage just overriding template / component with file from src folder.
If addon has more complex logic, we also have few samples:
- If addon define new registry namespace, search for
ember-responsive,ember-intlmentions in codebase. - If addon provide custom babel / handlebars plugins, search for
ember-ref-bucket,ember-concurrencymentions in codebase. - If addon provide custom styles, search for
ember-bootstrap,ember-modal-dialogmentions in codebase.