Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/node_modules
/public/hot
/public/build
/public/storage
/public/css
/public/js
Expand Down
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.4.0",
Expand All @@ -17,9 +12,8 @@
"lodash": "^4.17.19",
"postcss": "^8.4.6",
"postcss-import": "^14.0.2",
"tailwindcss": "^3.0.18"
},
"dependencies": {
"laravel-mix": "^6.0.49"
"tailwindcss": "^3.0.18",
"vite": "^3.0.2",
"laravel-vite-plugin": "^0.6.0"
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
2 changes: 1 addition & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./bootstrap');
import './bootstrap';
10 changes: 6 additions & 4 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
window._ = require('lodash');
import _ from 'lodash';
window._ = _;

/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/

window.axios = require('axios');
import axios from 'axios';
window.axios = axios;

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

Expand All @@ -22,7 +24,7 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// key: import.meta.env.VITE_PUSHER_APP_KEY,
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
// forceTLS: true
// });
14 changes: 14 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
refresh: true,
}),
],
});
18 changes: 0 additions & 18 deletions webpack.mix.js

This file was deleted.