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 build
configuration publicPath
is 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
-
Assets are the ones that need to be packaged as part of your project, such as the js of a plugin and some icons.
-
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