Questions tagged [laravel-mix]

0 votes
0 replies
How to define directory for compiled files with Laravel Mix
I am using Mix version 4.0.14. I'm updating a project to place all compiled files into a specific directory. Initially, everything went into the...
asked 1 month ago
0 votes
1 replies
Laravel Mix: Using Mix() to cache bust around another helper
I have a helper defined below: function cdn($file) { return env('CDN_URI', '').'/'.ltrim($file, '/'); } In my blade, I am serving the bund...
asked 1 month ago
0 votes
0 replies
vue.config.js to (laravel) webpack.mix.js
I started using Vue using the Vue CLI template. In that template you create a file called 'vue.config.js' to define some settings. More to find h...
asked 1 month ago
0 votes
0 replies
Laravel + Vue npm run watch\dev suddently freezes while building modules
I'm having some issues while working with Laravel and Vue using npm (laravel mix), everything was working fine until some point where npm run wat...
asked 1 month ago
1 votes
1 replies
I receive error 404 on refreshing browser using React router in Laravel Mix
I know there are several posts with similar questions but different approaches which do not seem understandable. I want to learn more and be able...
asked 1 month ago
0 votes
1 replies
How to configure laravel-mix to be able to use @material with vue.js
I need some help with configuring material-web-components to work with vue.js components. The error occurs when I want to import a @material comp...
0 votes
1 replies
Webpack alias in Laravel Mix to node_modules
I would like to use an alias in VUE.JS in a Laravel 5.8 project to import css and js I have in my module. webpack.mix.js mix.webpackConfig({ re...
0 votes
0 replies
How to lint SASS/SCSS on Laravel Mix
I have failed to find a solution for this. The only possible outcome I've seen so far is Laravel-Elixir-SCSS-Lint but the current download number...
asked 2 months ago
0 votes
1 replies
Custom sass to multisite project
I have 3 websites in one Laravel project: https://regalaunpuzzle.es/ https://calendariospersonalizados.es/ https://fotolienzo.com/ The 3 webs...
1 votes
1 replies
What's the proper way to inform users to refresh the browser on a SPA website (when .js files are changed)
I'm looking for a proper way to inform users about an updated website version. Whenever I upload new production .js files some parts of the webs...
0 votes
1 replies
Use different file with functions in Webpack
I use Laravel Mix for compiling JS files. I want to move all my functions to another file named functions.js. In app.js I want to include this fi...
asked 2 months ago
0 votes
0 replies
laravel-mix configuration for vue-loader
I was trying to create a css modules using vuejs. However, I cannot figure out how to configure the webpack. Here is my Vue component <te...
4 votes
0 replies
Compile template files/stubs into JS variables with Laravel mix
I have a folder /resources/js/stubs. In that folder sits a few files, lets say User.stub, Controller.stub and Migration.stub. I would like to use...
asked 2 months ago
0 votes
0 replies
CSS @import is not working with Laravel Mix
I have a CSS file in which I am importing other CSS files using @import. When I compile that CSS file using laravel-mix, I am unable to import th...
asked 3 months ago
0 votes
1 replies
Import a library/dependency with Laravel Mix
I have a small problem that took some time to find a solution. I'm trying to import this library to my project in Laravel. https://www.adchsm.co...
asked 2 months ago
0 votes
0 replies
Function undefined after added my script with Laravel Mix
My myscript.js file contains a function definition: function getValue(bttn_id){ var helpdat; if(bttn_id === "BttnGenAvgAge") hel...
asked 3 months ago
0 votes
1 replies
Moment js undefined Laravel
I'm trying to use moment.js in my laravel project, not using vue, but still importing the package via npm. My app.js file: require('moment/mome...
asked 3 months ago
0 votes
1 replies
How do I add lodash debounce to my project using Laravel Mix
I am new to using laravel mix and Yarn (coming from Codekit), so please bear with me! I have my webpack.mix.js file in my project which looks lik...
asked 3 months ago
0 votes
0 replies
Laravel Mix not transpiling vendor.js to es5
Laravel Mix does not seem to transpile vendor.js and manifest.js to ES5. It fails on iPhone Safari and IE 11. IE DevTools shows these errors:...
0 votes
0 replies
Using bootstrap-daterangepicker in vue component
I'm having trouble getting bootstrap-daterangepicker to work in my vue component. I installed the package via npm: npm i bootstrap-daterangepic...
asked 3 months ago
0 votes
0 replies
Laravel Mix, PostCss, BrowserSync path issue
I have the following webpack.mix.js file and I have an issue with the setPublicPath part. If I don't set the public path, the postCss work prope...
asked 3 months ago
0 votes
0 replies
webpack bundle size is larger than it should be
I have an existing Laravel app and for part of the app, I'm using Laravel Mix. I have 6 single file components with the CSS inside the Vue file....
asked 2 months ago
0 votes
2 replies
Laravel Mix: What is the benefit of extracting vendors?
My minified bundle size is 246kb. I am seeing if I can getting smaller and I read that extracting vue and jquery using mix.extract(['vue', 'jque...
asked 2 months ago
0 votes
1 replies
How can I run Laravel mix on custom URL?
I am creating one application that needs to be made on staging server from one point. Because creating it on local is impossible as it has some e...
asked 3 months ago
0 votes
0 replies
Laravel mix vanilla-JS and Vue into one file
I tried to require() an external vanilla.js file with pure JavaScript code in my vue-app file. The code was by webpack always at the end of the f...