laravel-mix

Lazy-Loaded vue-router components don't work with SSR

会有一股神秘感。 提交于 2020-05-25 07:53:46
问题 I have two different entry points for server.js and client.js.(I'm using vue-server-renderer and laravel-mix) - (my server.js and client.js looks exactly like described here - spatie/laravel-server-side-rendering and if I make static export import Test from '../views/Test' it works.. If I try importing the route without lazy loading, SSR works: import Test from "../views/Test"; export const routes = [{ path: '/my-route', name: "Test", component: Test, }] But if I try lazy-loading, it fails on

getting jest to work with babel / laravel-mix

自作多情 提交于 2020-03-25 12:32:00
问题 I'm using jest and testing-library/react for tests of my ReactJS components in a Laravel app. My tests break because the component to to test isn't recognised by jest even after importing it into the test. I have the following settings in jest.config.js module.exports = { testRegex: 'resources/js/tests/.*.test.js$', roots: ["<rootDir>/resources/js/"], moduleDirectories: ["resources/js/components", "resources/js/containers", "resources/js/views", "node_modules"] } And in the package.json file

laravel.mix does't compile scss files

匆匆过客 提交于 2020-03-21 08:25:11
问题 could you help with the following problem? My webpack.mix.js file const mix = require('laravel-mix'); const config = require('./webpack.config'); mix.webpackConfig(config); /* |-------------------------------------------------------------------------- | 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 |

'cross-env' is not recognized as an internal or external command,

牧云@^-^@ 提交于 2020-03-17 05:16:07
问题 Guys can you please help me on this I have trouble run npm run dev for my Laravel Mix. I followed links below but still error exist. Do i have a problem on my OS? I tried to remove node_modules , run npm install --global cross-env . and run NPM install again. https://github.com/JeffreyWay/laravel-mix/issues/478 Laravel 5.4 'cross-env' is not recognized as an internal or external command Here are my versions: Laravel mix version: ^2.0 Node Version (node -v): 8.9.0 NPM Version (npm -v): 5.6.0

'cross-env' is not recognized as an internal or external command,

浪尽此生 提交于 2020-03-17 05:16:01
问题 Guys can you please help me on this I have trouble run npm run dev for my Laravel Mix. I followed links below but still error exist. Do i have a problem on my OS? I tried to remove node_modules , run npm install --global cross-env . and run NPM install again. https://github.com/JeffreyWay/laravel-mix/issues/478 Laravel 5.4 'cross-env' is not recognized as an internal or external command Here are my versions: Laravel mix version: ^2.0 Node Version (node -v): 8.9.0 NPM Version (npm -v): 5.6.0

Laravel Mix multiple entry points generates one manifest.js

倾然丶 夕夏残阳落幕 提交于 2020-02-26 07:24:46
问题 I currently have a problem trying to use multiple entry points in my Mix file. // Mix frontend resources. mix.js('resources/assets/js/app.js', 'public/js') .extract([ 'jquery', 'bootstrap', 'aos', 'lity', ]); ... // Mix app resources. mix.js('resources/assets/app/js/app.js', 'public/app/js'); I have three entry points in my Mix file. One for frontend, backend and my "public app" file. The code above stores my frontend vendor.js and manifest.js file inside public/app/js when it should be

How to read mix-manifest.json from javascript

自闭症网瘾萝莉.ら 提交于 2020-01-25 07:18:25
问题 I cached my images using laravel-mix. For the image in blade, it works. However I couldn't figure out how to access that versioned paths from javascript. Is it possible to read mix-manifest.json from compiled javascript? So that I can create a mixin and get the versioned paths For example, in my mix-manifest.json I have "/images/hello.svg": "/images/hello.svg?id=0360de485c68385550da", and I thought if I can read the mix-manifest.json from my compiled javascript, I can create a helper method

mix.scripts is not working (webpack.mix.js)

痞子三分冷 提交于 2020-01-24 19:37:07
问题 i have the following webpack.mix.js: const { mix } = require('laravel-mix'); mix.scripts([ 'resources/assets/js/app.js', 'resources/assets/js/definers.js', 'resources/assets/js/tab_system.js', 'resources/assets/js/searchbox.js', 'node_modules/angular/angular.js', ], 'public/js/app.js', 'public/js'); mix.js('resources/assets/js/afegir_caracteristica_visuals.js', 'public/js') .js('resources/assets/js/afegir_categoria_visuals.js', 'public/js') .js('resources/assets/js/afegir_localitat_visuals.js

Laravel Mix generate fonts into another directory

痞子三分冷 提交于 2020-01-12 15:01:04
问题 I'm using laravel-mix which is built on the top of the webpack . I'm facing a problem with fonts directory. For Example, font-awesome package has a scss file and a font directory where all fonts are placed. font-awesome:. ├───scss │ fontawesome.scss └───webfonts fa-regular-400.eot fa-regular-400.svg fa-regular-400.ttf fa-regular-400.woff fa-regular-400.woff2 So i place this package in my resources/assets/sass directory. resources:. └───asset └───sass │ main.scss │ └───font-awesome (directory)

Laravel Mix generate fonts into another directory

╄→гoц情女王★ 提交于 2020-01-12 15:00:43
问题 I'm using laravel-mix which is built on the top of the webpack . I'm facing a problem with fonts directory. For Example, font-awesome package has a scss file and a font directory where all fonts are placed. font-awesome:. ├───scss │ fontawesome.scss └───webfonts fa-regular-400.eot fa-regular-400.svg fa-regular-400.ttf fa-regular-400.woff fa-regular-400.woff2 So i place this package in my resources/assets/sass directory. resources:. └───asset └───sass │ main.scss │ └───font-awesome (directory)