laravel-mix

Import a library/dependency with Laravel Mix

空扰寡人 提交于 2021-02-11 13:43:30
问题 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.com/slidebars/help/usage/initializing-slidebars/ I have installed the library with NPM. npm install slidebars --save-dev Then I'm trying to import this library to my app.js file which has the following structure: import jquery from 'jquery'; import popper from "popper.js"; try { window.$ = window.jQuery = jquery; window.Popper = popper.default; require(

How to use the google font v2 API import url in sass file with webpack laravel mix?

时光总嘲笑我的痴心妄想 提交于 2021-02-10 15:40:19
问题 I'm trying to import a google font into my a sass file, right at the top before all other styles. I am using webpack laravel mix, and I am also using the google font v2 API link. @import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&display=swap"); The problem with the new css2 link, it contains semi-colons and creates css parse errors. The sass file actually compiles fine, but this is the output of the css file... @import url(https://fonts.googleapis.com/css2

Workbox: cannot cache all files when build project

一个人想着一个人 提交于 2021-02-10 06:58:19
问题 I use Vuejs and I use workbox-webpack-plugin in order to make my site offline, I want to cache a folder which contains all my files (3 files) like picture below, but when I build my project(using Laravel-mix ). The main.js (which contains everything of Vue) cannot be cached in service-woker.js . I tried some ways to fix that but those didn't work. Does anybody face this issue, do you have any solution, many thanks! ->> 回答1: Why are you dealing it manually? Even though you can cache all static

Got “Blocked:mixed content” on HTTPS website

独自空忆成欢 提交于 2021-02-08 11:31:31
问题 What is the current behavior? I'm Running a Website using Webpack in Production. I was surprised to see in Chrome console the following error about loading the js file which is mixed with weback and laravel-mix My questions: How can we have a mixed content on a website loaded using HTTPS protocol? How can I fix the error? I don't plan to serve website over HTTP and I want my js to load properly both in development and production. 回答1: From MDN documentation on mixed content To fix this type

How to migrate from laravel mix to pure Webpack?

人盡茶涼 提交于 2021-02-07 01:58:31
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(

How to migrate from laravel mix to pure Webpack?

南楼画角 提交于 2021-02-07 01:57:21
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(

How to migrate from laravel mix to pure Webpack?

∥☆過路亽.° 提交于 2021-02-07 01:56:32
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(

How to migrate from laravel mix to pure Webpack?

老子叫甜甜 提交于 2021-02-07 01:55:49
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(

How to migrate from laravel mix to pure Webpack?

痴心易碎 提交于 2021-02-07 01:55:25
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(

How to migrate from laravel mix to pure Webpack?

无人久伴 提交于 2021-02-07 01:54:08
问题 Given the webpack.mix.js of a fresh Laravel project : const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js(