Skip to content

dev-server contentBase is not taken into account #5070

@innocenzi

Description

@innocenzi

Version

4.1.2

Reproduction link

https://github.com/hawezo/minimal-content-base-issue-reproduction

Environment info

System:
    OS: Windows 10 10.0.18363
    CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
  Binaries:
    Node: 12.5.0 - d:\programmes\laragon\bin\nodejs\node-v12\node.EXE
    Yarn: 1.19.2 - D:\Programmes\Laragon\bin\yarn\bin\yarn.CMD
    npm: 6.9.0 - d:\programmes\laragon\bin\nodejs\node-v12\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.1.2
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.1.2
    @vue/cli-plugin-babel: ^4.1.2 => 4.1.2
    @vue/cli-plugin-router:  4.1.2
    @vue/cli-plugin-typescript: ^4.1.2 => 4.1.2
    @vue/cli-plugin-vuex:  4.1.2
    @vue/cli-service: ^4.1.2 => 4.1.2
    @vue/cli-shared-utils:  4.1.2
    @vue/component-compiler-utils:  3.1.1
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    typescript: ^3.7.4 => 3.7.4
    vue: ^2.6.10 => 2.6.11
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.8.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  1. Initialize a vue-cli application.
  2. Move /src and /public to a folder, in this case /playground.
  3. Create a vue.config.js according to the documentation (which leads to this one).
  4. serve the application and notice that the index.html is not the same (check the meta title or whatever).

What is expected?

The contentBase parameter should be taken into account so the new public folder location is served.

What is actually happening?

The new public folder location is not served. Instead, the server is looking for a /public folder at the root of the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions