Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Npm 生成后未找到vue页面_Npm_Vue.js_Vuejs2_Vue Router - Fatal编程技术网

Npm 生成后未找到vue页面

Npm 生成后未找到vue页面,npm,vue.js,vuejs2,vue-router,Npm,Vue.js,Vuejs2,Vue Router,我和你有一条路 http://localhost:8080/user/reset 当我在dev的时候,它能找到工作 但在构建之后,我将dist放在localhost中 http://localhost/user/reset 它说找不到页面。 但我可以通过点击路由器链接从主页访问它,但不能通过浏览器中的直接地址 { path: '/user/reset', component: function(resolve) {

我和你有一条路

    http://localhost:8080/user/reset
当我在dev的时候,它能找到工作 但在构建之后,我将dist放在localhost中

    http://localhost/user/reset
它说找不到页面。 但我可以通过点击路由器链接从主页访问它,但不能通过浏览器中的直接地址

     {
        path: '/user/reset',
        component: function(resolve) {
            require(['@/components/view/reset.vue'], resolve)
        }
    }

这是我在routes.js中的路径,我忘了放.htaccess文件

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.html$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.html [L]
</IfModule>

重新启动发动机
重写基/
重写规则^index\.html$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.html[L]
更多细节。。。