Skip to content

Commit 09ba1fe

Browse files
chore: extract env to var (#681)
1 parent 6ef56a9 commit 09ba1fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vue.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ const path = require('path');
1212
const vueUtils = require('./src/setup-utils/vue-config-utils');
1313
const BASE_URL_PLACEHOLDER = require('./bin/baseUrlPlaceholder');
1414

15+
const isDev = process.env.NODE_ENV === 'development';
16+
1517
module.exports = vueUtils({
1618
// we are setting a hard public path to the placeholder template.
1719
// after the build is done, we will replace this with the BASE_URL env the user specified.
18-
publicPath: process.env.NODE_ENV === 'development' ? undefined : BASE_URL_PLACEHOLDER,
20+
publicPath: isDev ? undefined : BASE_URL_PLACEHOLDER,
1921
pages: {
2022
index: {
2123
entry: 'app/main.js',

0 commit comments

Comments
 (0)