Skip to content

Instantly share code, notes, and snippets.

View charlesBochet's full-sized avatar

Charles Bochet charlesBochet

View GitHub Profile
const mix = require('laravel-mix');
require('laravel-mix-merge-manifest')
/*
|--------------------------------------------------------------------------
| 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
if (['customers', 'backoffice'].includes(process.env.npm_config_section)) {
require(`${__dirname}/webpack.${process.env.npm_config_section}.mix.js`)
} else {
console.log(
'\x1b[41m%s\x1b[0m',
'Provide correct --section argument to build command: customers, backoffice'
)
throw new Error('Provide correct --section argument to build command!')
}
"scripts": {
"dev-all": "concurrently \"npm --section=backoffice run dev\" \"npm --section=customers run dev\" --kill-others-on-fail",
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
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.
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.
require('./bootstrap');
$(".hello-world-container-jquery" ).html("Hello Word with jQuery")
import Vue from 'vue'
Vue.component('hello-world', require('./HelloWorld.vue'));
const app = new Vue({
el: '#app'
});
<template>
<div class="container">
Hello World with vue
</div>
</template>
<script>
export default {
mounted() {
console.log('Hello World')
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.
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Customers</title>
</head>
<body>
<div class="flex-center position-ref full-height">