laravel-mix | The power webpack , distilled for the rest | Build Tool library
kandi X-RAY | laravel-mix Summary
kandi X-RAY | laravel-mix Summary
Laravel Mix provides a clean, fluent API for defining basic webpack build steps for your applications. Mix supports several common CSS and JavaScript pre-processors.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of laravel-mix
laravel-mix Key Features
laravel-mix Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-mix
QUESTION
I am using Tailwind CSS for my Laravel application, and want to remove the focus border on the input boxes. According to the documentation, focus:outline-none
should achieve this, although it is not working for me and the border still appears on focus.
It looks like I am targeting the wrong thing, as if I do focus:outline-black
, I can see a black outline as well as the standard blue one on focus.
focus:border-none
also does not fix the problem.
Any ideas?
...ANSWER
Answered 2021-Nov-16 at 02:25Maybe you can try add focus:outline-none
direct in your class.
QUESTION
'laravel8 + vue3
error Uncaught TypeError: Cannot read properties of undefined (reading 'component')
how can this error be avoided ?
app.js
...ANSWER
Answered 2021-Sep-16 at 14:59in Vue3
Your app.js
should be like that:
QUESTION
I have installed tailwindcss in a Laravel 9 project and trying to add custom colors. Then added this in webpack.mix.js
ANSWER
Answered 2022-Mar-23 at 08:19Change color
to colors
.
QUESTION
Okay, so I'm about to put my Laravel project in production. I tested everything on local host and it works perfectly using Tailwind 3. Yet, when I ran some PHP artisan commands to clear all cache and etc., migrate:fresh
my database, and then ran npm run dev
, I noticed that Tailwind removed the styles that I used in seeding blogs (I use seed to seed fake blog posts and view how they will look like).
For example I'm using the Typography Tailwind plugin with the utility-class prose
and so on. When I ran migrate:fresh
and the fake blog post deleted from database, then cleared Laravel cache, and ran npm run dev
, I noticed that all the prose
styles are being removed from app.css
. Of course I don't want that because this should be applied on each and every blog post that I will submit in production.
So how can I stop Tailwind from deleting these styles? I currently have all that I need and I don't want anything else removed.
webpack.mix
...ANSWER
Answered 2022-Mar-13 at 15:00Tailwind will only include the classes that it finds by scanning the files specified in the content
array in tailwind.config.js
. If you want to include additional classes that are only in your dynamic content, you can safelist those classes in your config. For example:
QUESTION
I'm trying to replace the Tailwindcss compiler with @tailwindcss/jit in a Laravel project that is using Vue Laravel Mix but I'm getting this Unknown word error.
✖ Mix Compiled with some errors in 489.07ms
ERROR in ./resources/sass/app.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): SyntaxError
(1:1) /Users/username-76/Desktop/projectname/resources/sass/app.scss Unknown word
1 | import api from "!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"; | ^ 2 | import content from "!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[6].oneOf[1].use[3]!./app.scss"; 3 |
at processResult (/Users/username-76/Desktop/projectname/node_modules/webpack/lib/NormalModule.js:701:19) at /Users/username-76/Desktop/projectname/node_modules/webpack/lib/NormalModule.js:807:5 at /Users/username-76/Desktop/projectname/node_modules/loader-runner/lib/LoaderRunner.js:399:11 at /Users/username-76/Desktop/projectname/node_modules/loader-runner/lib/LoaderRunner.js:251:18 at context.callback (/Users/username-76/Desktop/projectname/node_modules/loader-runner/lib/LoaderRunner.js:124:13) at Object.loader (/Users/username-76/Desktop/projectname/node_modules/postcss-loader/dist/index.js:140:7)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 2 errors
app.scss
...ANSWER
Answered 2021-Jul-30 at 19:30You're using the PostCSS plugin, yet you are attempting to compile SASS. Do it the following way instead.
QUESTION
I have webpack-cli installed on my laravel project. I don't know why first of all we need it to run my vue app but this is causing an error:
When I run npm run dev or npm run hot
...ANSWER
Answered 2021-Dec-20 at 09:04You need to update your vue-loader
QUESTION
Is there some way to pass parameters to the laravel mix via the command line and get them in the webpack.mix.js file? For example, I added the line frontend-dev, but I can't get the "foo" variable after running "yarn run frontend-dev".
package.json
...ANSWER
Answered 2021-Aug-05 at 12:21You can do it from the command line...
QUESTION
Laravel Mix has been installed the following way.
...ANSWER
Answered 2022-Feb-03 at 18:39Try installing process as a dev dependency.
QUESTION
In a fresh Laravel 9 installation, the URL processing from Laravel Mix does not work anymore.
npm outputs the following:
...ANSWER
Answered 2022-Feb-22 at 10:55Actually moving the css imports into resources/js/app.js
solves this problem. However, this results in the imported css to be included in the public/js/app.js
, not the public/css/app.css
.
QUESTION
In my latest project, I'm using laravel-mix with the built in browserSync, and I've added tailwindCss as a package.
This is the webpack.mix.js
file:
ANSWER
Answered 2022-Feb-15 at 22:01Ah, I think I discovered what's going on here. Looks like it's a known issue with Webpack documented by Tailwind themselves:
If your CSS seems to be rebuilding in an infinite loop, there’s a good chance it’s because your build tool doesn’t support the glob option when registering PostCSS dependencies.
Many build tools (such as webpack) don’t support this option, and as a result we can only tell them to watch specific files or entire directories. We can’t tell webpack to only watch *.html files in a directory for example.
That means that if building your CSS causes any files in those directories to change, a rebuild will be triggered, even if the changed file doesn’t match the extension in your glob.
And here's their recommendation:
To solve this problem, use more specific paths in your content config, making sure to only include directories that won’t change when your CSS builds:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-mix
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page