Passage de webpack à vite.dev

This commit is contained in:
2024-11-19 01:56:55 +01:00
committed by Bartuccio Antoine
parent 7b41051d0d
commit 8a8851847c
28 changed files with 1565 additions and 2818 deletions

View File

@ -1 +1 @@
require("@fortawesome/fontawesome-free/css/all.css");
import "@fortawesome/fontawesome-free/css/all.css";

View File

@ -1 +1,3 @@
window.htmx = require("htmx.org");
import htmx from "htmx.org";
Object.assign(window, { htmx });

View File

@ -1,25 +0,0 @@
import $ from "jquery";
import "jquery.shorten/src/jquery.shorten.min.js";
// We ship jquery-ui with jquery because when standalone with webpack
// JQuery is also included in the jquery-ui package. We do gain space by doing this
// We require jquery-ui components manually and not in a loop
// Otherwise it increases the output files by a x2 factor !
require("jquery-ui/ui/widgets/accordion.js");
require("jquery-ui/ui/widgets/autocomplete.js");
require("jquery-ui/ui/widgets/button.js");
require("jquery-ui/ui/widgets/dialog.js");
require("jquery-ui/ui/widgets/tabs.js");
require("jquery-ui/themes/base/all.css");
/**
* Simple wrapper to solve shorten not being able on legacy pages
* @param {string} selector to be passed to jQuery
* @param {Object} options object to pass to the shorten function
**/
function shorten(selector, options) {
$(selector).shorten(options);
}
window.shorten = shorten;

View File

@ -0,0 +1,2 @@
// This is only used to import jquery-ui css files
import "jquery-ui/themes/base/all.css";