Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
vue-cli3-template-master
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0c3c0cf3
authored
2019-11-19 14:35:01 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
07b9e059
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
src/pages/About.vue
vue.config.js
src/pages/About.vue
View file @
0c3c0cf
...
...
@@ -2,7 +2,7 @@
<div
class=
"about"
>
<h1>
This is an about page
</h1>
<div
class=
"cc"
>
<div
class=
"ddd"
></div>
<div
class=
"ddd"
>
1233
</div>
</div>
</div>
</
template
>
...
...
vue.config.js
View file @
0c3c0cf
const
Timestamp
=
new
Date
().
getTime
();
const
MiniCssExtractPlugin
=
require
(
'mini-css-extract-plugin'
);
// 打包目录
let
webpack_public_path
=
'dist'
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
webpack_public_path
=
process
.
env
.
VUE_APP_TITLE
}
module
.
exports
=
{
configureWebpack
:
{
// webpack 配置
// 修改打包后js文件名
output
:
{
// 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】
filename
:
`static/js/[name].
${
Timestamp
}
.js`
,
chunkFilename
:
`static/js/[name].
${
Timestamp
}
.js`
},
// 修改打包后css文件名
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
`static/css/[name].
${
Timestamp
}
.css`
,
chunkFilename
:
`static/css/[name].
${
Timestamp
}
.css`
})
]
},
// 修改打包后img文件名
// chainWebpack: config => {
// config.module
// .rule('images')
// .use('url-loader')
// .tap(options => {
// return {
// limit: 4096,
// fallback: {
// loader: 'file-loader',
// options: {
// name: `img/[name].${Timestamp}.[ext]`
// }
// }
// };
// })
// },
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
//例如 https://www.my-app.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.my-app.com/my-app/,则设置 baseUrl 为 /my-app/。
...
...
Please
register
or
sign in
to post a comment