Vue-cli: Vue Cli 3 seems to be removing styles from assets

Created on 10 Sep 2018  路  8Comments  路  Source: vuejs/vue-cli

Version

3.0.1

Reproduction link

https://github.com/ChadTaljaardt/BootstrapTest

Node and OS info

node 10.9.0 / yarn 1.9.4 / windows 7

Steps to reproduce

When you view the buttons from bootstrap, they should have a margin.

you can see a working version (without vue cli 3) here:

What is expected?

you can see a working version (without vue cli 3) here: https://jsfiddle.net/krq18pej/2/

What is actually happening?

There is no margin between the buttons.
Top version is Vue Cli 3 and bottom which is correct is the JSFiddle version
untitled22222

cannot reproduce

Most helpful comment

@Justineo I tried to do the suggested fix of adding this to the vue.config.js, however it didn't work.

chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => {
        options.compilerOptions.preserveWhitespace = true
        return options
      })
  }

All 8 comments

:+1:

See #1020.

@Justineo I tried to do the suggested fix of adding this to the vue.config.js, however it didn't work.

chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => {
        options.compilerOptions.preserveWhitespace = true
        return options
      })
  }

however it didn't work

provide a reproduction, please.

however it didn't work

Works on my machine: https://asciinema.org/a/x0BYCcnRil3anJjL1EdQVLKoZ

Was able to get this working, thanks :+1:

@Justineo I tried to do the suggested fix of adding this to the vue.config.js, however it didn't work.

chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => {
        options.compilerOptions.preserveWhitespace = true
        return options
      })
  }

It does not work for me. But when i delete return options, it works.

Same here: It only works after removing "return options".
Removing the " .loader('vue-loader')" part doesn't appear to make any difference either

Was this page helpful?
0 / 5 - 0 ratings