Skip to content

Commit

Permalink
Merge pull request #172 from microsoft/add-test-vite
Browse files Browse the repository at this point in the history
Add a test for vite
  • Loading branch information
DanielRosenwasser authored May 5, 2022
2 parents a7129c7 + f541748 commit 5bfaf87
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -23,4 +23,4 @@ jobs:

- name: Run tests
run: node ./test/validateModuleExportsMatchCommonJS/index.js
if: matrix.node-version == '14.x'
if: matrix.node-version == '16.x'
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 5bfaf87

Please sign in to comment.