Difference between webpack assets static directory

When publishing, it has nothing to do with src. After packaging, everything will be in dist (same level as src), and as long as your run buildconfiguration publicPathis correct, static resources can be placed on cdn or elsewhere.
I put it in assets in order to save trouble (it also works). . .

assets The contents of the folder will be  webpack packaged together,
and the  static folder is the browser directly to request the file

  1. Assets are the ones that need to be packaged as part of your project, such as the js of a plugin and some icons.

  2. Static places are things that are independently requested, maybe the pictures you use when you develop, and things that may be replaced by resource updates in the future.

 

For example, background images are generally placed in static, while small icons are placed in assets

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324435195&siteId=291194637