question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set path for mix-manifest.json

See original GitHub issue

Environment: Laravel Mix Version: 1.4.2 Node Version: 6.10.0 NPM Version: 3.10.10 OS: OS X

Description Hi, In older version 0.x there was no problem with this since the manifest file was generated in the main folder of output path (inside public folder), but in the latest version, the manifest file is always generated in public folder. For example:

Behaviour on 0.x mix.js('resources/assets/js/app.js','public/build/js') --> manifest file is generated in /public/build/mix-manifest.js

Behaviour on 1.4.2 mix.js('resources/assets/js/app.js','public/build/js') --> manifest file is generated in /public/mix-manifest.js

My question is: Is there a way to set the path for manifest file? The idea is that I want to have 2 different manifest files, one for dev env and another for prod env.

Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

6reactions
zarkin404commented, Aug 31, 2017

@geodeveloper you can use the mix.setPublicPath() to set the path.

2reactions
georgecocacommented, Aug 31, 2017

@zarkin404 I got it working, was my fault, I had to update also the mix.js('resources/assets/js/app.js','public/build/js'), that’s why I have duplicate public, just removed the public and now works as expected.

Thanks for your help, closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions | Laravel Mix Documentation
If you're not using Laravel, your mix-manifest.json file will be dumped into the project root. If you need to change this, call mix.setPublicPath('dist/') ......
Read more >
Why does Laravel mix create a new folder with mix-manifest ...
A new public folder is created and the mix-manifest. json file is placed in it and it the error 500 is returned. I...
Read more >
Create a mix-manifest.json file with esbuild | stefanzweifel.io
It contains a map of paths to CSS or JavaScript files where the path has been augmented with an id -parameter and a...
Read more >
How to resolve npm run dev that creates a new folder with mix ...
How to resolve npm run dev that creates a new folder with mix-manifest.json. Hello everyone, I hope you are doing well In Laravel,...
Read more >
How to use the laravel-mix.config.manifest function in ... - Snyk
StatsWriterPlugin({ filename: 'mix-manifest.json', transform: Mix.manifest.transform.bind(Mix.manifest), }), new plugins.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found