Skip to content

Commit 42e74d1

Browse files
iamkunisland205
authored andcommitted
Chore: SSR test (ElemeFE#16797)
* init ssr test * ssr test
1 parent 05ca2d1 commit 42e74d1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

build/release.sh

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ then
1515
# build
1616
VERSION=$VERSION npm run dist
1717

18+
# ssr test
19+
node test/ssr/require.test.js
20+
1821
# publish theme
1922
echo "Releasing theme-chalk $VERSION ..."
2023
cd packages/theme-chalk

test/ssr/require.test.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const path = require('path');
2+
3+
try {
4+
process.env.VUE_ENV = 'server';
5+
require(path.join(process.env.PWD, './lib/index'));
6+
console.log('SSR require test PASS');
7+
} catch (e) {
8+
console.error('SSR require test error');
9+
throw Error(e);
10+
}

0 commit comments

Comments
 (0)