PHP Classes

File: nova.mix.js

Recommend this page to a friend!
  Classes of Naif Alshaye   Laravel Nova Toggle Field Switch   nova.mix.js   Download  
File: nova.mix.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Nova Toggle Field Switch
Output HTML for a Laravel Nova toggle switch field
Author: By
Last change:
Date: 1 year ago
Size: 762 bytes
 

Contents

Class file image Download
const mix = require('laravel-mix') const webpack = require('webpack') const path = require('path') class NovaExtension { name() { return 'nova-extension' } register(name) { this.name = name } webpackPlugins() { return new webpack.ProvidePlugin({ _: 'lodash', Errors: 'form-backend-validation', }) } webpackConfig(webpackConfig) { webpackConfig.externals = { vue: 'Vue', } webpackConfig.resolve.alias = { ...(webpackConfig.resolve.alias || {}), 'laravel-nova': path.join( __dirname, '../../vendor/laravel/nova/resources/js/mixins/packages.js' ), } webpackConfig.output = { uniqueName: this.name, } } } mix.extend('nova', new NovaExtension())