Closed manniL closed 5 years ago
Ok, so the original intention for the trim
plugin was to remove the whitespace around the CSS because it is extracted from the <style>
section inside a Vue file (with other parts of the Vue file padded as blank lines to preserve proper line numbers).
Always setting it to an empty string will make the dynamic inserted CSS in development harder to read. So in 2603ee238a6c8114094a1339a5060c629c0b12e0 I've made it so that it only sets it to a newline when the whitespace has not been already trimmed (e.g. by cssnano).
Fix is out in 2.3.1.
Currently the component CSS is separated by a line break (caused by the
trim
stylePlugin). Though this can be helpful for debugging, the characters are not necessary at all (at least from what I know).Current state
With fix
Related issues and PRs
https://github.com/vuejs/component-compiler-utils/pull/36 https://github.com/vuejs/vue-loader/issues/1395 https://github.com/cssnano/cssnano/issues/586 https://github.com/nuxt/nuxt.js/issues/4311