B
B
BonBon Slick2018-11-27 21:48:32
Vue.js
BonBon Slick, 2018-11-27 21:48:32

Global variables without vue cli?

Global variables without vue cli?
Now if I try to get the process in the component, the env object is empty.

'use strict';

const merge = require('webpack-merge');
const prodEnv = require('./prod.env');

module.exports = merge(prodEnv, {
    TEST: '"development"',
    APP_NAME: '/aptttti',
    STORAGE_KEY: '/aptttti',
    REFRESH_TOKEN_URL: '/aptttti',
    API_BASE_URL: '/aptttti',
    DEBUG: true,
    NODE_ENV: 'development',
});

https://www.npmjs.com/package/dotenv
or
https://www.npmjs.com/package/cross-env
or you can add a variable to app.js via export Where can I update the state for vuex?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question