Unable to mix output .js file to the parent directory
See original GitHub issue- Laravel Mix Version: 1.4.5
- Node Version: 8.2.1
- NPM Version: 5.4.2
- OS: macOS 10.12.6
I’ve created a src
folder within a WordPress themes directory for all build scripts, node modules, etc (so I can hide it when publishing to the server).
In that folder I have webpack.mix.js
:
mix.sass('sass/style.scss', '../style.css')
.js('js/script.js', '../script.js')
This publishes the style.css
in the themes (parent) directory as required, but when I do the same for the script.js
file it publishes it in the current src
folder but creates a list of all folders from my system Users directory Users/jackbarham/Code/etc/.../etc/theme/src/script.js
all the way to the output file.
I’ve tried altering paths, but I can’t get it to work or understand why it’s working for CSS but not JS.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Unable to mix output .js file to the parent directory · Issue #1220
js file it publishes it in the current src folder but creates a list of all folders from my system Users directory Users/jackbarham/Code/etc/......
Read more >Unable to locate Mix file: /js/app.js. - Laracasts
When i'm deploying my site to Laravel Forge, it give me an error saying "Unable to locate Mix file" . locally is fully...
Read more >How to copy static files to build directory with Webpack?
In Gulp I have task which copies all files and folders from /static/ folder to /build/ folder. How to do the same with...
Read more >CoffeeScript
js files are in a folder where the nearest parent package.json file contains "type": "module" . Because the runtime is evaluating the generated...
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
This happens when a browser or tool downloads a compiled file (e.g., script.min.js ), then attempts to fetch its corresponding source map ( ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did sth like that and it’s working.
mix.setPublicPath('../') .js('resources/assets/js/app.js', 'js') .sass('resources/assets/sass/app.scss', 'css');
This worked for me: mix.setPublicPath(‘…/parent-folder/’);