Skip to content

Commit 8860d61

Browse files
committed
Add a test for vite
1 parent c827964 commit 8860d61

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

test/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@rollup/plugin-node-resolve": "9.0.0",
66
"webpack": "4.44.2",
77
"webpack-cli": "3.3.12",
8-
"snowpack": "2.12.1"
8+
"snowpack": "2.12.1",
9+
"vite": "2.8.0"
910
}
1011
}

test/vite/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { __awaiter } from "tslib";
2+
if (typeof __awaiter !== "function") throw new Error("Missing expected helper __awaiter");

test/vite/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"scripts": {
3+
"test": "../node_modules/.bin/vite build && node build/index.js"
4+
}
5+
}

test/vite/vite.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { URL, fileURLToPath } from "url";
2+
export default {
3+
build: {
4+
outDir: "build",
5+
emptyOutDir: true,
6+
lib: {
7+
entry: fileURLToPath(new URL("index.js", import.meta.url)),
8+
formats: ["es"],
9+
fileName: () => "index.js"
10+
}
11+
}
12+
};

0 commit comments

Comments
 (0)