8000 How to preserve whitespace using Mix 6 and Vue 3? · Issue #2594 · laravel-mix/laravel-mix · GitHub
[go: up one dir, main page]

Skip to content
How to preserve whitespace using Mix 6 and Vue 3? #2594
@martinbean

Description

@martinbean
  • Laravel Mix Version: 6.0.0-beta.11
  • Node Version: 12.16.3
  • NPM Version: 6.14.4
  • OS: macOS Catalina 10.15.7

Description:

As per comment on #2463, whitespace is removed from web pages if I compile JavaScript that contains Vue 3 components, making web pages look awful.

Steps To Reproduce:

Use Sass with Vue 3. This is my webpack.mix.js file:

const mix = require('laravel-mix');

mix
    .sass('resources/sass/admin.scss', 'public/css')
    .sass('resources/sass/app.scss', 'public/css')
    .js('resources/js/admin.js', 'public/js')
    .js('resources/js/app.js', 'public/js')
    .ts('resources/ts/club.ts', 'public/js')
    .vue()
    .options({
        processCssUrls: false
    })
    .sourceMaps()
    .version();

if (mix.inProduction()) {
    mix.disableNotifications();
}

When compiled, whitespace between inline elements is “collapsed” in the browser. Happens if I run both npm run dev and npm run prod.

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

      0