diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdcc7e2..ac4dcb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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; @@ -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: @@ -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. @@ -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 diff --git a/package.json b/package.json index 64cf90b..fe4b77f 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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": { diff --git a/siroc.config.ts b/siroc.config.ts deleted file mode 100644 index d4474b7..0000000 --- a/siroc.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineSirocConfig } from "siroc"; - -export default defineSirocConfig({ - rollup: { - output: { - sourcemap: true, - }, - }, -}); diff --git a/vitest.config.ts b/vite.config.ts similarity index 58% rename from vitest.config.ts rename to vite.config.ts index 49a84bd..f4fc99a 100644 --- a/vitest.config.ts +++ b/vite.config.ts @@ -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: {