chore(vitejs): update
This commit is contained in:
parent
95a049d0eb
commit
f6609d42ce
7 changed files with 713 additions and 431 deletions
|
@ -505,7 +505,7 @@ GEM
|
|||
rack (>= 2.1.0)
|
||||
rack-protection (2.2.0)
|
||||
rack
|
||||
rack-proxy (0.7.2)
|
||||
rack-proxy (0.7.4)
|
||||
rack
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
|
@ -745,10 +745,10 @@ GEM
|
|||
axiom-types (~> 0.1)
|
||||
coercible (~> 1.0)
|
||||
descendants_tracker (~> 0.0, >= 0.0.3)
|
||||
vite_rails (3.0.9)
|
||||
vite_rails (3.0.13)
|
||||
railties (>= 5.1, < 8)
|
||||
vite_ruby (~> 3.0)
|
||||
vite_ruby (3.1.6)
|
||||
vite_ruby (~> 3.0, >= 3.2.2)
|
||||
vite_ruby (3.2.11)
|
||||
dry-cli (~> 0.7.0)
|
||||
rack-proxy (~> 0.6, >= 0.6.1)
|
||||
zeitwerk (~> 2.2)
|
||||
|
|
|
@ -2,11 +2,16 @@ import { Application } from '@hotwired/stimulus';
|
|||
import invariant from 'tiny-invariant';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type Loader = () => Promise<{ [key: string]: any }>;
|
||||
type Module = { [key: string]: any };
|
||||
type Loader = () => Promise<Module>;
|
||||
|
||||
const controllerAttribute = 'data-controller';
|
||||
const controllers = import.meta.globEager('../controllers/*.{ts,tsx}');
|
||||
const lazyControllers = import.meta.glob('../controllers/lazy/*.{ts,tsx}');
|
||||
const controllers = import.meta.glob<Module>('../controllers/*.{ts,tsx}', {
|
||||
eager: true
|
||||
});
|
||||
const lazyControllers = import.meta.glob<Module>(
|
||||
'../controllers/lazy/*.{ts,tsx}'
|
||||
);
|
||||
const controllerLoaders = new Map<string, Loader>();
|
||||
|
||||
export function registerControllers(application: Application) {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
= Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce)
|
||||
|
||||
= vite_client_tag
|
||||
= vite_react_refresh_tag
|
||||
= vite_javascript_tag 'application'
|
||||
- if administrateur_signed_in?
|
||||
= vite_javascript_tag 'track-admin'
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
= favicon_link_tag(image_url("#{FAVICON_96PX_SRC}"), type: "image/png", sizes: "96x96")
|
||||
|
||||
= vite_client_tag
|
||||
= vite_react_refresh_tag
|
||||
= vite_javascript_tag 'application'
|
||||
|
||||
= preload_link_tag(asset_url("Muli-Regular.woff2"))
|
||||
|
|
28
package.json
28
package.json
|
@ -58,27 +58,27 @@
|
|||
"@types/react": "^17.0.43",
|
||||
"@types/react-dom": "^17.0.14",
|
||||
"@types/sortablejs": "^1.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1",
|
||||
"@vitejs/plugin-legacy": "^1.2.3",
|
||||
"@vitejs/plugin-react": "^1.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.43.0",
|
||||
"@vitejs/plugin-legacy": "^2.0.0",
|
||||
"@vitejs/plugin-react": "^2.0.0",
|
||||
"@vitejs/plugin-react-refresh": "^1.3.0",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"axe-core": "^4.4.3",
|
||||
"del-cli": "^5.0.0",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint": "^8.27.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.31.1",
|
||||
"eslint-plugin-react": "^7.31.10",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"jsdom": "^20.0.0",
|
||||
"postcss": "^8.4.14",
|
||||
"jsdom": "^20.0.2",
|
||||
"postcss": "^8.4.19",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.8.2",
|
||||
"vite": "^2.9.13",
|
||||
"vite-plugin-full-reload": "^1.0.1",
|
||||
"vite-plugin-ruby": "^3.0.9",
|
||||
"vitest": "^0.20.3"
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.2.0",
|
||||
"vite-plugin-full-reload": "^1.0.4",
|
||||
"vite-plugin-ruby": "^3.1.2",
|
||||
"vitest": "^0.25.2"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "del tmp public/graphql && bin/vite clobber",
|
||||
|
|
|
@ -6,10 +6,7 @@ import RubyPlugin from 'vite-plugin-ruby';
|
|||
|
||||
const plugins = [
|
||||
RubyPlugin(),
|
||||
ViteReact({
|
||||
parserPlugins: ['classProperties', 'classPrivateProperties'],
|
||||
jsxRuntime: 'classic'
|
||||
}),
|
||||
ViteReact({ jsxRuntime: 'classic', fastRefresh: false }),
|
||||
FullReload(['config/routes.rb', 'app/views/**/*'], { delay: 200 })
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue