二级目录部署
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
demo/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta base="/demo/">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
|
||||
@@ -61,8 +61,9 @@ export const constantRouterMap = [
|
||||
]
|
||||
|
||||
export default new Router({
|
||||
// mode: 'hash',
|
||||
mode: 'history',
|
||||
mode: 'hash',
|
||||
base: '/demo/',
|
||||
// mode: 'history',
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
})
|
||||
|
||||
@@ -12,9 +12,8 @@ const port = 8013 // 端口配置
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
module.exports = {
|
||||
// hash 模式下可使用
|
||||
// publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
|
||||
publicPath: '/',
|
||||
outputDir: 'dist',
|
||||
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/demo/',
|
||||
outputDir: 'demo',
|
||||
assetsDir: 'static',
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
productionSourceMap: false,
|
||||
|
||||
Reference in New Issue
Block a user