Skip to content

Commit 5bfaf87

Browse files
Merge pull request #172 from microsoft/add-test-vite
Add a test for vite
2 parents a7129c7 + f541748 commit 5bfaf87

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [10.x, 12.x, 14.x]
11+
node-version: [12.x, 14.x, 16.x]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -23,4 +23,4 @@ jobs:
2323

2424
- name: Run tests
2525
run: node ./test/validateModuleExportsMatchCommonJS/index.js
26-
if: matrix.node-version == '14.x'
26+
if: matrix.node-version == '16.x'

test/package.json

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 12 additions & 0 deletions
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)