Skip to content

´vue-cli-service build´ and ´vue-cli-service build --watch´ generate a different dist directory structure #3613

Closed
@smtxdev

Description

@smtxdev

Version

3.5.0

Environment info

Environment Info:

  System:
    OS: macOS 10.14
    CPU: (4) x64 Intel(R) Core(TM) i5-5575R CPU @ 2.80GHz
  Binaries:
    Node: 11.4.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 72.0.3626.121
    Firefox: 65.0.1
    Safari: 12.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.2 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.2 
    @vue/babel-preset-app:  3.5.0 
    @vue/babel-preset-jsx:  1.0.0-beta.2 
    @vue/babel-sugar-functional-vue:  1.0.0-beta.2 
    @vue/babel-sugar-inject-h:  1.0.0-beta.2 
    @vue/babel-sugar-v-model:  1.0.0-beta.2 
    @vue/babel-sugar-v-on:  1.0.0-beta.2 
    @vue/cli-overlay:  3.5.0 
    @vue/cli-plugin-babel: ^3.5.0 => 3.5.0 
    @vue/cli-plugin-eslint: ^3.5.0 => 3.5.0 
    @vue/cli-service: ^3.5.0 => 3.5.0 
    @vue/cli-shared-utils:  3.5.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/eslint-config-prettier: ^4.0.1 => 4.0.1 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.2 
    vue: ^2.6.6 => 2.6.8 
    vue-eslint-parser:  2.0.3 
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.0 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.5.21 => 2.6.8 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 3.5.0

Steps to reproduce

  • vue create test
  • node_modules/.bin/vue-cli-service build
  • node_modules/.bin/vue-cli-service build --watch

What is expected?

Same dist-folder directory structure.

What is actually happening?

The directory structure of dist-folder is different.


With: vue-cli-service build

  • /dist/css/app.css
  • /dist/js/app.js

With: vue-cli-service build --watch

  • /dist/app.css
  • /dist/app.js

With: vue-cli-service build --watch --mode production

  • /dist/css/app.css
  • /dist/js/app.js

Correct but on local I need mode development. This is not a solution.


Further infos: #1317 (comment)

Activity

kjleitz

kjleitz commented on Mar 11, 2019

@kjleitz

Same issue here! It's a problem because we're dynamically serving some files from dist/ with an express server, and since the directory isn't the same in development vs. production it can't reference them properly. I could add an environment check in the server, but I don't think that's actually going to be perfectly accurate, since the build mode and the NODE_ENV don't always mirror each other... plus, it'd make the logic a little dirty.

4 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kjleitz@smtxdev

      Issue actions

        ´vue-cli-service build´ and ´vue-cli-service build --watch´ generate a different dist directory structure · Issue #3613 · vuejs/vue-cli