Skip to content

Commit

Permalink
Add a test for vite
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Feb 10, 2022
1 parent c827964 commit 8860d61
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"@rollup/plugin-node-resolve": "9.0.0",
"webpack": "4.44.2",
"webpack-cli": "3.3.12",
"snowpack": "2.12.1"
"snowpack": "2.12.1",
"vite": "2.8.0"
}
}
2 changes: 2 additions & 0 deletions test/vite/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { __awaiter } from "tslib";
if (typeof __awaiter !== "function") throw new Error("Missing expected helper __awaiter");
5 changes: 5 additions & 0 deletions test/vite/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"scripts": {
"test": "../node_modules/.bin/vite build && node build/index.js"
}
}
12 changes: 12 additions & 0 deletions test/vite/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { URL, fileURLToPath } from "url";
export default {
build: {
outDir: "build",
emptyOutDir: true,
lib: {
entry: fileURLToPath(new URL("index.js", import.meta.url)),
formats: ["es"],
fileName: () => "index.js"
}
}
};

0 comments on commit 8860d61

Please sign in to comment.