Questions tagged [webpack-mix]

13 questions
2
votes
1 answer

Vite How can I bundle all Javascript files in a single file like webpack.mix?

Vite How can I bundle all Javascript files in a single file like webpack.mix? When I run Vite Build it creates a file for each component. That said, what is the correct config to avoid many http requests? I was expecting to generate only one JS file…
Misael
  • 93
  • 1
  • 8
1
vote
1 answer

Export TailwindCSS CSS rules to file instead of rendering CSS rules on DOM

On my project I use: TailwindCSS + Emotion + Tailwind Macro. I just want to export TailwindCSS CSS rules to the currently generated styles.css file instead of rendering CSS rules on the DOM (html > head > style[]). That way I would reduce the size…
Viewsonic
  • 827
  • 2
  • 15
  • 34
1
vote
1 answer

webpack strips global variable for mounting 'new Vue' as app

Webpack production build is stripping out the global variable for mounting my vue app - the var vm = part. So: var vm = new Vue({ ... }); gets compiled to just: new Vue({ ... }); I have no webpack.config.js so its just using the default - the…
codifier
  • 21
  • 4
1
vote
0 answers

Deoptimised the styling of undefined as it exceeds the max of 500KB. [Babel]

I'm getting the following when compiling for production, development or watch: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB. It puts the message 3 times before actually completing the…
YaBCK
  • 2,949
  • 4
  • 32
  • 61
1
vote
1 answer

laravel 8 include certain javascrip file into other js file

I have two files, one is my main js file called app.js and I have a file where I store all my js functions, called functions.js. As you can see on the image below. But I want to include the functions.js file into the app.js file. So I googled on…
Mark_
  • 113
  • 1
  • 12
1
vote
1 answer

Bootstrap bootstrap.bundle.js does not work for Button Dropdown on Laravel Project

In a fresh Laravel project, I've included Bootstrap 5 'npm install bootstrap' and imported in /resrouces/sass/app.scss @import "~bootstrap/scss/bootstrap"; - great, it works. Now I have a dropdown component that is not working, and I can't figure…
El Sordo
  • 165
  • 2
  • 14
1
vote
0 answers

Weird Laravel Mix Webpack Chunkname with 2 files combined

I'm using Laravel Mix with webpack to compile vue. I'm changing the routes to use dynamic import because the production app.js is almost 3MB. In the middle of doing that, I noticed this weird behavior. There are some generated javascript with weird…
Christhofer Natalius
  • 2,727
  • 2
  • 30
  • 39
0
votes
0 answers

Using Webpack Mix, how can I minify my JS including imports

I inherited a Vue2 app written in 2017/18. After a bunch of trial and error I finally have Webpack mix running and compiling the js and CSS files. My webpack.mix.js is pretty simple: let mix = require('laravel-mix'); mix.js('assets/js/app.js',…
TJ Sherrill
  • 2,465
  • 7
  • 50
  • 88
0
votes
0 answers

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. (Laravel Mix)

Not sure how to resolve it, any ideas with the the below? You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js. My…
YaBCK
  • 2,949
  • 4
  • 32
  • 61
0
votes
1 answer

How to compile multiple mix.webpackConfig with multple folders in Laravel VueJs

I've a webpack.mix.js in laravel vuejs and i want separate configurations for Admin, Subscribers and Dealers which are the folders i've created into resourse/js folder and i want to compile these folders into seperate folders in public/adminapp,…
Salman Khan Sohoo
  • 97
  • 1
  • 1
  • 13
0
votes
1 answer

browserSync suddenly has problem injecting its script to custom domain and does for localhost (webpack-mix)

The situation is like this - I'm using Laravel's webpack-mix and for each project I use a custom domain like example-domain.test. I had a configuration that made browserSync sync files at domain: bs.example-domain.test and not sync for domain…
Picard
  • 3,745
  • 3
  • 41
  • 50
-1
votes
1 answer

Why npx mix --production creates numbered files with same name and same directory?

Hi I try to run my npx mix --production command and I have an issue with that. App build but I found that on output it generated lot of files inside js/app/ folder with numbers as name. What is it ? How can I avoid that? …
Young L.
  • 922
  • 3
  • 13
  • 33
-1
votes
1 answer

How to solve vuejs hot reload in laravel app (with laradock) that returns "Error Cannot GET /"

I am using webpack mix for hot reload of vuejs in laravel app. However, I receive the error message in each page load after running npm run hot Cannot GET / for home page / webpack.mix.js const mix = require('laravel-mix'); var webpackConfig = { …
davidlee
  • 5,611
  • 17
  • 56
  • 82