laravel-mix

Enable inline javascript in LESS

人走茶凉 提交于 2019-11-29 06:18:29
问题 I would like to use inline js in my less files but I get the following message: Inline JavaScript is not enabled. Is it set in your options? How can I enable that? 回答1: I had same problem, I use webpack with less loader, I needed to add javascript option in less loader config: { test: /\.less$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }, { loader: "less-loader", options: { javascriptEnabled: true } }] } I found in the sourcecode of less compiler: https://github.com/less/less

How to Install Font Awesome in Laravel Mix

吃可爱长大的小学妹 提交于 2019-11-28 19:34:25
问题 I've tried to install Font Awesome using Laravel Mix but when executing run npm dev I get the following message: ERROR Failed to compile with 1 errors error in ./~/font-awesome/scss/font-awesome.scss Module build failed: /** ^ Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi" in /var/www/html/blog/node_modules/font-awesome/scss/font-awesome.scss (line 1, column 1) I removed the comments in the file and tried to change font paths, but it did not

Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command

南楼画角 提交于 2019-11-27 17:23:37
I'm trying to run npm run dev for Laravel Mix and I get this error: > @ dev D:\projects\ptcs > cross-env NODE_ENV=development webpack --progress --hide-modules -- config=node_modules/laravel-mix/setup/webpack.config.js 'cross-env' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: `cross-env NODE_ENV=development webpack --progress --hide- modules --config=node_modules/laravel-mix/setup/webpack.config.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. I updated node.js to 6.11.0

Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command

坚强是说给别人听的谎言 提交于 2019-11-27 04:11:52
问题 I'm trying to run npm run dev for Laravel Mix and I get this error: > @ dev D:\projects\ptcs > cross-env NODE_ENV=development webpack --progress --hide-modules -- config=node_modules/laravel-mix/setup/webpack.config.js 'cross-env' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: `cross-env NODE_ENV=development webpack --progress --hide- modules --config=node_modules/laravel-mix/setup/webpack.config

Laravel 5.7 + Font Awesome

你。 提交于 2019-11-26 21:34:22
问题 I'm trying to include the Font Awesome toolkit in Laravel 5.7. These are the steps I took: 1) Run npm install --save-dev @fortawesome/fontawesome-free 2) Check the folders in node_modules/ and everything looks OK. $fa-font-path: "../webfonts"; // Bootstrap @import '~bootstrap/scss/bootstrap'; @import '~@fortawesome/fontawesome-free/scss/fontawesome.scss'; @import '~@fortawesome/fontawesome-free/scss/solid.scss'; @import '~@fortawesome/fontawesome-free/scss/regular.scss'; @import '~