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

Config.publicPath cannot contain dot characters #1373

Closed
unclecheese opened this issue Dec 16, 2017 · 2 comments
Closed

Config.publicPath cannot contain dot characters #1373

unclecheese opened this issue Dec 16, 2017 · 2 comments

Comments

@unclecheese
Copy link

unclecheese commented Dec 16, 2017

  • Laravel Mix Version: 1.7.2
  • Node Version 8.9.2
  • NPM Version 5.5.1
  • OS: macOS 10.13

Description:

If Config.publicPath contains a dot character, e.g. setPublicPath('./'), this ends up getting parsed as unescaped regex in Manifest.noramlizePath(), which ends up truncating the first character of the path.

Steps To Reproduce:

webpack.mix.js

mix.setPublicPath('./')
  .scss('path/to/main.scss', 'path/to/dist.css');

Resulting manifest.json:

{
  '/ath/to/dist.css': '/ath/to/dist/css'
}

Granted, setting ./ as a public path is probably redundant in most cases (I removed it and it works fine), but it seems to me the mix API should be robust enough that it doesn't lead to bizarre results like this that leave devs digging through internals to figure out what configuration error they made.

@gummiforweb
Copy link

gummiforweb commented Dec 22, 2017

I have the same issue, having "./" in the public path works before 1.4.2 tho. Not sure which version does it stop working. The compiled file still go to the proper location, it's just the path in manifest is messed up.

In my case, i have to put './' as public path in order for it to work on windows because of this issue #1126 .

Related to this one commit:
9a0cbbc#diff-f969cfea02300f4d08f70dc524871166

@JeffreyWay
Copy link
Collaborator

Fixed.

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

No branches or pull requests

3 participants