diff --git a/composer.json b/composer.json index 54c7874..d271da5 100644 --- a/composer.json +++ b/composer.json @@ -37,4 +37,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file diff --git a/nova.mix.js b/nova.mix.js new file mode 100644 index 0000000..bd1d31b --- /dev/null +++ b/nova.mix.js @@ -0,0 +1,33 @@ +const mix = require('laravel-mix') +const webpack = require('webpack') +const path = require('path') + +class NovaExtension { + name() { + return 'nova-extension' + } + + register(name) { + this.name = name + } + + 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()) \ No newline at end of file diff --git a/package.json b/package.json index ce62188..21d9350 100644 --- a/package.json +++ b/package.json @@ -24,4 +24,4 @@ "vue-router": "^4.0.15", "vuex": "^4.0.2" } -} +} \ No newline at end of file diff --git a/resources/js/components/FilterBehavior.js b/resources/js/components/FilterBehavior.js index 1066775..8f832bd 100644 --- a/resources/js/components/FilterBehavior.js +++ b/resources/js/components/FilterBehavior.js @@ -47,4 +47,4 @@ export default { return payload; } } -} +} \ No newline at end of file diff --git a/resources/js/components/GlobalFilter.vue b/resources/js/components/GlobalFilter.vue index 53821b9..e0bddbf 100644 --- a/resources/js/components/GlobalFilter.vue +++ b/resources/js/components/GlobalFilter.vue @@ -157,4 +157,4 @@ export default { }, }, }; - + \ No newline at end of file diff --git a/src/GlobalFilterable.php b/src/GlobalFilterable.php index 4cd6721..da9fd17 100644 --- a/src/GlobalFilterable.php +++ b/src/GlobalFilterable.php @@ -35,4 +35,4 @@ public function globalFiltered($request, $model, $filters = []) } return $model; } -} +} \ No newline at end of file diff --git a/src/NovaGlobalFilter.php b/src/NovaGlobalFilter.php index 454bd2b..94c9527 100644 --- a/src/NovaGlobalFilter.php +++ b/src/NovaGlobalFilter.php @@ -66,4 +66,8 @@ public function title($title) $this->title = $title; return $this; } +<<<<<<< HEAD } +======= +} +>>>>>>> f7d11cd65d4c1c4d5785f65ab5e5756acc5c4017 diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..c025b73 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,19 @@ +module.exports = { + chainWebpack: config => { + config.resolve.alias.set('vue', '@vue/compat') + + config.module + .rule('vue') + .use('vue-loader') + .tap(options => { + return { + ...options, + compilerOptions: { + compatConfig: { + MODE: 2 + } + } + } + }) + } + } \ No newline at end of file