[JS] Unvendor jQuery and update to latest version

This commit is contained in:
Earlopain 2022-12-22 15:11:05 +01:00
parent f744463d29
commit 60ebe9f467
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
6 changed files with 11 additions and 11 deletions

View File

@ -5,6 +5,8 @@ function importAll(r) {
r.keys().forEach(r);
}
export { default as $ } from "jquery";
import Rails from "@rails/ujs";
Rails.start();

View File

@ -34,7 +34,6 @@
<% end %>
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
<%= javascript_include_tag "/vendor/jquery-3.5.0.min.js", nonce: true, integrity: "sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=", crossorigin: "anonymous" %>
<%= stylesheet_link_tag "/vendor/fontawesome/css/all.min.css", nonce: true, integrity: "sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf", crossorigin: "anonymous" %>
<%= stylesheet_pack_tag "application", nonce: true %>
<%= javascript_pack_tag "application", nonce: true, defer: false %>

View File

@ -4,7 +4,10 @@ const vueConfig = require('./loaders/vue')
const customConfig = {
resolve: {
extensions: ['.css']
extensions: ['.css'],
alias: {
"jquery": "jquery/src/jquery",
},
},
module: {
rules: [
@ -20,9 +23,6 @@ const customConfig = {
optimization: {
runtimeChunk: false
},
externals: {
jquery: "jQuery"
},
target: ['web', 'es5']
}

View File

@ -9,6 +9,7 @@
"core-js": "3.8",
"css-loader": "^6.3.0",
"css-minimizer-webpack-plugin": "^3.0.2",
"jquery": "^3.6.3",
"jquery-hotkeys": "^0.2.2",
"jquery-ui": "^1.12.1",
"mini-css-extract-plugin": "^2.3.0",

File diff suppressed because one or more lines are too long

View File

@ -2645,10 +2645,10 @@ jquery-ui@^1.12.1:
dependencies:
jquery ">=1.8.0 <4.0.0"
"jquery@>=1.8.0 <4.0.0":
version "3.6.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16"
integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==
"jquery@>=1.8.0 <4.0.0", jquery@^3.6.3:
version "3.6.3"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.3.tgz#23ed2ffed8a19e048814f13391a19afcdba160e6"
integrity sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==
js-tokens@^4.0.0:
version "4.0.0"