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

vue-cli 3 & absolute path bug & baseUrl bug #2595

Closed
xgqfrms opened this issue Sep 25, 2018 · 11 comments
Closed

vue-cli 3 & absolute path bug & baseUrl bug #2595

xgqfrms opened this issue Sep 25, 2018 · 11 comments

Comments

@xgqfrms
Copy link

xgqfrms commented Sep 25, 2018

absolute path bug

vue-cli-service & dist/index.html & absolute path bug

环境信息

  • 操作系统:win10pro x64
  • Iceworks 版本: 2.8

问题描述

vue-cli-service & dist/index.html & absolute path bug

image

错误信息

resources path error

image

wanted

relative path

image

@vue-bot
Copy link

vue-bot commented Sep 25, 2018

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!


你好,你的 issue 不符合我们所要求的格式,因此已被自动关闭。为了确保每个 issue 都提供必需的相关信息,请务必使用我们的 Issue 向导 来创建新 issue,谢谢!

@vue-bot vue-bot closed this as completed Sep 25, 2018
@Akryum
Copy link
Member

Akryum commented Sep 25, 2018

Did you read the docs?

@solidevolution
Copy link

solidevolution commented Sep 25, 2018

@Akryum a better help for him (and everyone else) would be a deep link to explain.

@Akryum
Copy link
Member

Akryum commented Sep 25, 2018

Here: https://cli.vuejs.org/config/#baseurl

@xgqfrms
Copy link
Author

xgqfrms commented Sep 26, 2018

@Akryum THX!

but it's still not work, why?

module.exports = {
    lintOnSave: false,
    configureWebpack: {
        resolve: {
            extensions: [
                ".js",
                ".json",
                ".vue"
            ],
        },
    },
    baseUrl: "./xxx/" ,
    // baseUrl: process.env.NODE_ENV === "production" ? "./" : "./",
};

bug

image

@xgqfrms
Copy link
Author

xgqfrms commented Sep 26, 2018

ok & but very confused

baseUrl: "././" ,

image

module.exports = {
    lintOnSave: false,
    configureWebpack: {
        resolve: {
            extensions: [
                ".js",
                ".json",
                ".vue"
            ],
        },
    },
    baseUrl: "././" ,
    // baseUrl: "./" ,
    // baseUrl: process.env.NODE_ENV === "production" ? "./" : "./",
    outputDir: "build",
    filenameHashing: false,
    crossorigin: "anonymous",
    integrity: true,
};

@haoqunjiang
Copy link
Member

href="xxx" is equivalent to href="./xxx" in HTML.

@jinrichardJIN
Copy link

请问现在解决了 我同遇见

@iamwelk
Copy link

iamwelk commented Oct 29, 2018

ok & but very confused

baseUrl: "././" ,

image

module.exports = {
    lintOnSave: false,
    configureWebpack: {
        resolve: {
            extensions: [
                ".js",
                ".json",
                ".vue"
            ],
        },
    },
    baseUrl: "././" ,
    // baseUrl: "./" ,
    // baseUrl: process.env.NODE_ENV === "production" ? "./" : "./",
    outputDir: "build",
    filenameHashing: false,
    crossorigin: "anonymous",
    integrity: true,
};

不知道为什么,不过确实有用。。

@xgqfrms xgqfrms changed the title absolute path bug absolute path bug & baseUrl bug Nov 16, 2018
@xgqfrms xgqfrms changed the title absolute path bug & baseUrl bug vue-cli 3 & absolute path bug & baseUrl bug Nov 16, 2018
@chucklai92
Copy link

ok & but very confused

baseUrl: "././" ,

image

module.exports = {
    lintOnSave: false,
    configureWebpack: {
        resolve: {
            extensions: [
                ".js",
                ".json",
                ".vue"
            ],
        },
    },
    baseUrl: "././" ,
    // baseUrl: "./" ,
    // baseUrl: process.env.NODE_ENV === "production" ? "./" : "./",
    outputDir: "build",
    filenameHashing: false,
    crossorigin: "anonymous",
    integrity: true,
};

谢谢你 我也是这个问题 你这个方法的确可以解决

@L-Chris
Copy link

L-Chris commented Aug 28, 2019

ok & but very confuse

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

9 participants