Home  >  Article  >  Web Front-end  >  iview-admin summarizes several packaging problems encountered by webpack

iview-admin summarizes several packaging problems encountered by webpack

php是最好的语言
php是最好的语言Original
2018-08-03 14:23:005372browse

Webpack novice, summarize a few packaging problems encountered
1. The difference between developing a proxy server and online interface calling
Use devServer as a proxy during development

iview-admin summarizes several packaging problems encountered by webpack

When packaging, you must distinguish between the production environment and the development environment:

Development configuration file
webpack.dev.config.js

iview-admin summarizes several packaging problems encountered by webpack

Production Configuration file
webpack.prod.config.js

iview-admin summarizes several packaging problems encountered by webpack

After this configuration, the interface calling method becomes

iview-admin summarizes several packaging problems encountered by webpack

iview-admin summarizes several packaging problems encountered by webpack

Instead of the common /apis/dust-server/login form,
The purpose of writing this is so that the interface that can be requested after deployment will not contain There is /apis causing the request address to be incorrect
Interface address after deployment
iview-admin summarizes several packaging problems encountered by webpack

2.es6 cannot be recognized in node_modules

iview-admin summarizes several packaging problems encountered by webpack

3. Image loading
This should be a problem with vue. Although I don’t know what the principle is, as long as the image is placed in this folder (iview-admin deleted this, you have to build one yourself), usually It can be loaded.
iview-admin summarizes several packaging problems encountered by webpack

Related articles:

What are the problems with vue webpack packaging path

webpack packaging Problems and solutions for error reports after accessing the page

The above is the detailed content of iview-admin summarizes several packaging problems encountered by webpack. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn