Code Monkey home page Code Monkey logo

jaset-vue3-app-scaffold's Introduction

use node gloable variable: process.env to divide the prod and the dev;

  • use package cross-env to add a key envMode in process.env
  • use package Dotenv to put the different variabel in the process.env.envMode
  • use package webpack-merge to take the union set
  • warning: the webpack error:because webapck implement the .env.prod,so the env is production,but when run the defineplugin it has the conflict
    • solution:optimization:{nodeEnv:false}

set the devServer proxy to avoid cross-domain

  • in the webpack.dev.js you can set VUE_APP_useURL as axios.baseURL
  • and in the proxy also can set the secure(disable http)ใ€ changeOrigin(set the target as host) and pathRewrite to replace baseurl or other url,

[refer link](refer link:https://blog.csdn.net/weixin_42349568/article/details/124370794)

jaset-vue3-app-scaffold's People

Contributors

jasminesetsuna avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.