fix(@vant/cli): fix ssr.js require path (#9999)

This commit is contained in:
neverland 2021-12-05 11:34:54 +08:00 committed by GitHub
parent e0877f971a
commit 7bc6d2c48d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,9 +14,9 @@ async function genEntryForSSR() {
const cjsContent = `'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./dist/${name}.cjs.min.js');
module.exports = require('./${name}.cjs.min.js');
} else {
module.exports = require('./dist/${name}.cjs.js');
module.exports = require('./${name}.cjs.js');
};
`;