2.0.0-beta.16 • Published 5 days ago

@aurelia/vite-plugin v2.0.0-beta.16

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

License: MIT TypeScript CircleCI npm

@aurelia/vite-plugin

Installing

For the latest stable version:

npm i -D @aurelia/vite-plugin

For our nightly builds:

npm i -D @aurelia/vite-plugin

Usage

In vite.config.js:

import { defineConfig } from 'vite';
import aurelia from '@aurelia/vite-plugin';

export default defineConfig({
  ...,
  plugins: [aurelia()],
});

For apps in TypeScript, an extra typing definition is required for html module. You can add following file to your typing folder.

Note that this is generated by default by the aurelia cli.

html.d.ts

declare module '*.html' {
  import { IContainer } from '@aurelia/kernel';
  import { BindableDefinition } from '@aurelia/runtime';
  export const name: string;
  export const template: string;
  export default template;
  export const dependencies: string[];
  export const containerless: boolean | undefined;
  export const bindables: Record<string, BindableDefinition>;
  export const shadowOptions: { mode: 'open' | 'closed'} | undefined;
  export function register(container: IContainer);
}

Dev config

By default, the aurelia vite plugin generates aliases to dev packages for better experience during development. It'll detect development mode based on the mode config from vite. You can also override using useDev options, in case there needs to be clarity into some behavior of the applications:

import { defineConfig } from 'vite';
import aurelia from '@aurelia/vite-plugin';

export default defineConfig({
  ...,
  plugins: [aurelia({ useDev: true })], // always use dev bundles
});
2.0.0-beta.16

7 days ago

2.0.0-beta.15

23 days ago

2.0.0-beta.14

1 month ago

2.0.0-beta.13

2 months ago

2.0.0-beta.12

2 months ago

2.0.0-beta.11

3 months ago

2.0.0-beta.10

4 months ago

2.0.0-beta.9

5 months ago

2.0.0-beta.8

10 months ago

2.0.0-beta.7

11 months ago

2.0.0-beta.6

12 months ago

2.0.0-beta.5

1 year ago

2.0.0-beta.4

1 year ago