Skip to content

Commit

Permalink
build: switch to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Dec 19, 2022
1 parent 0b012a8 commit 969969c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ npm run dev

### Building

Our build system is handled by [siroc][siroc], a near-zero-config build tool powered by [esbuild](https://github.com/evanw/esbuild). It takes care of:
Our build system is handled by [Vite][vite]. Vite takes care of:

- Generating a [CommonJS (`.cjs`)](https://nodejs.org/docs/latest/api/modules.html#modules_modules_commonjs_modules) bundle and its source map;
- Generating an [ECMAScript (`.mjs`)](https://nodejs.org/docs/latest/api/modules.html#modules_modules_commonjs_modules) bundle and its source map;
Expand Down Expand Up @@ -362,7 +362,7 @@ This folder contains utility functions used to test the project.

This folder contains snapshots generated by the test framework when using snapshot testing strategies. It should not be altered manually.

### 📄  `.editorconfig`, `.eslintrc.cjs`, `.prettierrc`, `.size-limit.json`, `.versionrc`, `vitest.config.ts`, `siroc.config.ts`, `tsconfig.json`
### 📄  `.editorconfig`, `.eslintrc.cjs`, `.prettierrc`, `.size-limit.json`, `.versionrc`, `vite.config.ts`, `tsconfig.json`

These files contain configuration for their eponymous tools:

Expand All @@ -371,8 +371,8 @@ These files contain configuration for their eponymous tools:
- [Prettier][prettier];
- [Size Limit][size-limit];
- [Standard Version][standard-version];
- [Vite][vite];
- [Vitest][vitest];
- [`siroc`][siroc];
- [TypeScript][typescript].

Any change to those files are welcome but they should be first discussed on our [TypeScript template][template-issue]. Common sense still applies if the project requires some specific changes.
Expand Down Expand Up @@ -438,8 +438,8 @@ The minimum Node version supported by the project is stated under the `engines`
[prettier]: https://prettier.io
[size-limit]: https://github.com/ai/size-limit
[standard-version]: https://github.com/conventional-changelog/standard-version
[vitest]: https://vitest.dev/
[siroc]: https://github.com/unjs/siroc
[vite]: https://vitejs.dev
[vitest]: https://vitest.dev
[typescript]: https://www.typescriptlang.org
[template]: https://github.com/prismicio/prismic-typescript-template
[template-issue]: https://github.com/prismicio/prismic-typescript-template/issues/new/choose
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"vetur"
],
"scripts": {
"build": "siroc build",
"dev": "siroc build --watch",
"build": "vite build",
"dev": "vite build --watch",
"format": "prettier --write .",
"lint": "eslint --ext .js,.ts .",
"playground:build": "vite build playground",
Expand Down Expand Up @@ -80,6 +80,9 @@
"size-limit": "^8.1.0",
"standard-version": "^9.5.0",
"typescript": "^4.9.4",
"vite": "^4.0.2",
"vite-plugin-sdk": "^0.1.0",
"vitest": "^0.26.0",
"vue": "^3.2.45"
},
"peerDependencies": {
Expand Down
9 changes: 0 additions & 9 deletions siroc.config.ts

This file was deleted.

4 changes: 3 additions & 1 deletion vitest.config.ts → vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite";
import sdk from "vite-plugin-sdk";

export default defineConfig({
plugins: [sdk()],
test: {
environment: "jsdom",
coverage: {
Expand Down

0 comments on commit 969969c

Please sign in to comment.