Closed chan15 closed 3 months ago
You can import using import validate from 'jquery-validation'
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import inject from "@rollup/plugin-inject";
export default defineConfig({
plugins: [
inject({
$: 'jquery',
jQuery: 'jquery',
}),
laravel({
input: [
'resources/css/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
});
import "jquery-validation";
$(function() {
$('#frm').validate();
});
This is how I used the plugin, but I got ReferenceError: require is not defined
New feature motivation
I want to use this plugin on vite.
New feature description
vite is a popular js and css pack tool, use es module to compiler, hope this wonderful plugin can support it.