Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass processing path won't resolve outside of public path #2757

Open
lukashroch opened this issue Jan 8, 2021 · 1 comment · May be fixed by #2829
Open

Sass processing path won't resolve outside of public path #2757

lukashroch opened this issue Jan 8, 2021 · 1 comment · May be fixed by #2829

Comments

@lukashroch
Copy link

  • Laravel Mix Version: 6.0.9
  • Node Version: 14.15.0
  • NPM Version: 6.14.8
  • OS: Win10

Description:

sass() step won't allow to transverse to project's root in V6, Below was working fine in V5.

Steps To Reproduce:

Example mix file:

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

const dest = 'public/front';

mix
  .setPublicPath(dest)
  .js('resources/js/front.js', `${dest}/app.js`)
  .vue()
  .extract()
  .options({
    processCssUrls: false,
  })
  .sass('resources/scss/front.scss', `${dest}/app.css`)
  .sass('resources/scss/mail.scss', '../../resources/views/vendor/mail/html/themes/default.css'); // <-- V5 working example

V6 Error:

[webpack-cli] [Error: EINVAL: invalid argument, mkdir 'C:\Apps\xampp\htdocs\cspu\public\front\C:\Apps\xampp\resources\views\vendor\mail\html\themes'] {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'mkdir',
  path: 'C:\\Apps\\xampp\\htdocs\\cspu\\public\\front\\C:\\Apps\\xampp\\resources\\views\\vendor\\mail\\html\\themes'
}

Might be related to setPublicPath()? Looks like it resolves to absolute and when absolute path used in sass too, output resolves in concatenated two absolutes paths. Though, it looks like it tries to transverse, see the segments of the second absolute path.

@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant