jialh
2025-01-07 bb59b053247ef82969b64979260e2478bd732e1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSsr = exports.isInHybridNVue = exports.withSourcemap = void 0;
function withSourcemap(config) {
    if (config.command === 'serve') {
        return true;
    }
    return !!config.build.sourcemap;
}
exports.withSourcemap = withSourcemap;
function isInHybridNVue(config) {
    return config.nvue && process.env.UNI_RENDERER !== 'native';
}
exports.isInHybridNVue = isInHybridNVue;
function isSsr(command, config) {
    if (command === 'serve') {
        return !!(config.server && config.server.middlewareMode);
    }
    if (command === 'build') {
        return !!(config.build && config.build.ssr);
    }
    return false;
}
exports.isSsr = isSsr;