Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Vite 3 #231

Merged
merged 6 commits into from Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Presets/React.php
Expand Up @@ -32,11 +32,13 @@ public static function install()
protected static function updatePackageArray(array $packages)
{
return [
'@babel/preset-react' => '^7.13.13',
'@vitejs/plugin-react' => '^1.3.2',
'@vitejs/plugin-react' => '^2.0.0',
'react' => '^17.0.2',
'react-dom' => '^17.0.2',
] + Arr::except($packages, ['@vitejs/plugin-vue', 'vue']);
] + Arr::except($packages, [
'@vitejs/plugin-vue',
'vue'
]);
}

/**
Expand Down
5 changes: 1 addition & 4 deletions src/Presets/Vue.php
Expand Up @@ -31,12 +31,9 @@ public static function install()
protected static function updatePackageArray(array $packages)
{
return [
'@vitejs/plugin-vue' => '^2.3.3',
'resolve-url-loader' => '^3.1.2',
'sass' => '^1.32.11',
'@vitejs/plugin-vue' => '^3.0.1',
'vue' => '^3.2.37',
] + Arr::except($packages, [
'@babel/preset-react',
'@vitejs/plugin-react',
'react',
'react-dom',
Expand Down
2 changes: 1 addition & 1 deletion src/Presets/bootstrap-stubs/bootstrap.js
Expand Up @@ -28,7 +28,7 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: import.meta.env.VITE_PUSHER_APP_KEY,
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_CLUSTER}.pusher.com`,
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
Expand Down
11 changes: 7 additions & 4 deletions src/Presets/bootstrap-stubs/vite.config.js
Expand Up @@ -3,9 +3,12 @@ import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel([
'resources/sass/app.scss',
'resources/js/app.js',
]),
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
});
11 changes: 7 additions & 4 deletions src/Presets/react-stubs/vite.config.js
Expand Up @@ -4,10 +4,13 @@ import react from '@vitejs/plugin-react';

export default defineConfig({
plugins: [
laravel([
'resources/sass/app.scss',
'resources/js/app.js',
]),
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
react(),
],
});
11 changes: 7 additions & 4 deletions src/Presets/vue-stubs/vite.config.js
Expand Up @@ -4,10 +4,13 @@ import vue from '@vitejs/plugin-vue';

export default defineConfig({
plugins: [
laravel([
'resources/sass/app.scss',
'resources/js/app.js',
]),
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
Expand Down