惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 鼓舞飞扬

点表格,某一列出现报错。 qiankun使用关键代码 tinymce富文本编辑器使用 取消上次ajax 在vue项目中取消axios请求(单个和全局) JavaScript中的export、export default、exports和module.exports(export、export default、exports使用详细) 前端经典面试题 白屏优化 全网首发黑马程序员鸿蒙 HarmonyOS NEXT星河版零基础入门到实战,零基础也能快速入门鸿蒙开发教程 - 鼓舞飞扬 自定义树形模糊搜索 mapbox聚合使用自定义图标 Mapbox添加多个不同的点图标 mapbox gl 标注无法显示 报错 Error {message: ‘Unimplemented type: 4‘} mapbox加载图片类型图标 mapbox大数据展示 The engine “node“ is incompatible with this module.解决方法 配置镜像 【NPM报错】Node Sass does not yet support your current environment Turf.js简介
vue 图片资源应该如何存放并引入(public、assets)?
鼓舞飞扬 · 2024-08-14 · via 博客园 - 鼓舞飞扬

public放不会变动的文件(相当于vue-cli2.x中的static)
public/ 目录下的文件并不会被Webpack处理:它们会直接被复制到最终的打包目录(默认是dist/static)下。必须使用绝对路径引用这些文件,这个取决于你vue.config.js中 publicPath 的配置,默认的是/。


assets放可能会变动的文件
assets目录中的文件会被webpack处理解析为模块依赖,只支持相对路径形式。

简单来说就是就是public放别人家js文件(也就是不会变动),assets放自己写的js、css文件(需要改动的文件)

https://huaweicloud.csdn.net/638eec47dacf622b8df8dba2.html