Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patricklx/ember-vite-hmr
https://github.com/patricklx/ember-vite-hmr
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/patricklx/ember-vite-hmr
- Owner: patricklx
- Created: 2024-02-01T12:03:32.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T10:13:24.000Z (4 months ago)
- Last Synced: 2024-09-12T10:24:06.389Z (4 months ago)
- Language: JavaScript
- Size: 2.41 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
ember-vite-hmr
Ember Vite Hmr plugin.
this can hot reload
- helpers
- modifiers
- components + templates, fcct components and its deps
- routes/controllers/route-templatesthis tries to keep the state of properties in components and controller
it cannot hot reload local properties that turn out to be helpers/modifiers/components.
## Installation
```
ember install ember-vite-hmr
```## Usage
update your `vite.config.mjs` with
```js
import { hmr } from 'ember-vite-hmr';plugins: [hmr()];
```update you `babel.config.cjs`
```js
const { hotAstProcessor } = require('ember-vite-hmr/lib/babel-plugin');
plugins: [['ember-vite-hmr/lib/babel-plugin'], ...other];
```and for `'babel-plugin-ember-template-compilation'`
```js
transforms: [...templateCompatSupport(), hotAstProcessor.transform],
```## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## License
This project is licensed under the [MIT License](LICENSE.md).