Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for vite #172

Merged
merged 2 commits into from May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
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
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
@@ -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
@@ -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
@@ -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"
}
}
};