Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack-VUEcli3的配置 #7

Open
PleaseStartYourPerformance opened this issue Nov 12, 2019 · 0 comments
Open

Webpack-VUEcli3的配置 #7

PleaseStartYourPerformance opened this issue Nov 12, 2019 · 0 comments

Comments

@PleaseStartYourPerformance
Copy link
Owner

PleaseStartYourPerformance commented Nov 12, 2019

掘金博客:https://juejin.im/post/5c6e608c5188256283255704#heading-14

官网:https://cli.vuejs.org/zh/config/#publicpath

publicPath:路由中的设置

Vue CLI 会假设你的应用是被部署在一个域名的根路径上,例如 https://www.my-app.com/。
如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.my-app.com/my-app/ 则设置 publicPath 为 /my-app/

这个值也可以被设置为空字符串 ('') 或是相对路径 ('./'),这样所有的资源都会被链接为相对路径,这样打出来的包可以被部署在任意路径,也可以用在类似 Cordova hybrid 应用的文件系统

outputDir

当运行 vue-cli-service build 时生成的生产环境构建文件的目录。注意目标目录在构建之前会被清除

assetsDir

放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
从生成的资源覆写 filename 或 chunkFilename 时,assetsDir 会被忽略。

@PleaseStartYourPerformance PleaseStartYourPerformance changed the title Webpack-vueCli3的配置 Webpack-VUEcli3的配置 Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant