diff --git a/.ai/guidelines/frontend.md b/.ai/guidelines/frontend.md
index 38447574d..4bec6cbfd 100644
--- a/.ai/guidelines/frontend.md
+++ b/.ai/guidelines/frontend.md
@@ -1,4 +1,6 @@
# Frontend Build (BIOSPEX)
-- This project builds assets with Laravel Mix (`webpack.mix.js`), not Vite. Ignore Vite-specific guidance.
-- If the user doesn't see a frontend change reflected in the UI, they may need to run `yarn run dev` or `yarn run production`. Ask them.
+- This project builds assets with Vite (`vite.config.js`, `laravel-vite-plugin`) and yarn. Blade views load them with `@vite(...)`.
+- `yarn build` writes `public/build`; `yarn dev` runs the dev server. If the user doesn't see a frontend change reflected in the UI, they may need to run `yarn build` or `yarn dev`. Ask them.
+- The scripts are ES modules. jQuery and the libraries the pages call are globals set by `resources/js/jquery-global.js` and the `*-globals.js` files, imported first. An inline `
-
-
+
+
+ @include('common.amchart')
+ @vite('resources/js/amChartEventRate-entry.js')
@endpush
\ No newline at end of file
diff --git a/resources/views/admin/event/show.blade.php b/resources/views/admin/event/show.blade.php
index 324776d38..ed68a8783 100644
--- a/resources/views/admin/event/show.blade.php
+++ b/resources/views/admin/event/show.blade.php
@@ -18,9 +18,9 @@
@push('scripts')
@if($event->teams->isNotEmpty())
-
-
-
+
+
+ @vite('resources/js/livewire/index.js')
@endpush
@endsection
diff --git a/resources/views/admin/expedition/edit.blade.php b/resources/views/admin/expedition/edit.blade.php
index c68f1e1b3..d07e8a1f4 100644
--- a/resources/views/admin/expedition/edit.blade.php
+++ b/resources/views/admin/expedition/edit.blade.php
@@ -101,6 +101,6 @@ class="form-control custom-select col-sm-5 {{ ($errors->has('workflow_id')) ? 'i
@push('scripts')
-
+ @vite('resources/js/livewire/index.js')
@endpush
@endsection
diff --git a/resources/views/admin/group/show.blade.php b/resources/views/admin/group/show.blade.php
index 74faf7305..ddf1ec447 100644
--- a/resources/views/admin/group/show.blade.php
+++ b/resources/views/admin/group/show.blade.php
@@ -129,10 +129,10 @@
@endsection
@push('scripts')
-
-
+
+
-
-
-
-@include('common.amchart')
+@vite('resources/js/admin-app.js')
+@vite('resources/js/amChartWeDigBioRate-entry.js')
@livewireScripts
@stack('scripts')
\ No newline at end of file
diff --git a/resources/views/admin/layout/head.blade.php b/resources/views/admin/layout/head.blade.php
index 0395d1176..610a88099 100644
--- a/resources/views/admin/layout/head.blade.php
+++ b/resources/views/admin/layout/head.blade.php
@@ -10,7 +10,7 @@
@include('common.favicon')
-
+ @vite('resources/sass/admin.scss')
@stack('styles')
@production
@include('common.google-analytics')
diff --git a/resources/views/admin/partials/invite-modal-body.blade.php b/resources/views/admin/partials/invite-modal-body.blade.php
index badad4169..803a34b28 100644
--- a/resources/views/admin/partials/invite-modal-body.blade.php
+++ b/resources/views/admin/partials/invite-modal-body.blade.php
@@ -17,5 +17,4 @@
-
@endif
\ No newline at end of file
diff --git a/resources/views/admin/project/clone.blade.php b/resources/views/admin/project/clone.blade.php
index c8b320a3c..f165a0916 100644
--- a/resources/views/admin/project/clone.blade.php
+++ b/resources/views/admin/project/clone.blade.php
@@ -272,5 +272,5 @@ class="form-control {{ ($errors->has('language_skills')) ? 'is-invalid' : '' }}
@include('admin.partials.project-banner-modal')
@endsection
@push('scripts')
-
+ @vite('resources/js/livewire/index.js')
@endpush
\ No newline at end of file
diff --git a/resources/views/admin/project/create.blade.php b/resources/views/admin/project/create.blade.php
index c43fc62d4..d94098216 100644
--- a/resources/views/admin/project/create.blade.php
+++ b/resources/views/admin/project/create.blade.php
@@ -275,6 +275,6 @@ class="btn btn-link p-0"
@include('admin.partials.project-banner-modal')
@push('scripts')
-
+ @vite('resources/js/livewire/index.js')
@endpush
@endsection
diff --git a/resources/views/admin/project/edit.blade.php b/resources/views/admin/project/edit.blade.php
index b1a4ecd83..c68f9baf2 100644
--- a/resources/views/admin/project/edit.blade.php
+++ b/resources/views/admin/project/edit.blade.php
@@ -288,6 +288,6 @@ class="form-control {{ ($errors->has('language_skills')) ? 'is-invalid' : '' }}
@include('admin.partials.project-banner-modal')
@push('scripts')
-
+ @vite('resources/js/livewire/index.js')
@endpush
@endsection
\ No newline at end of file
diff --git a/resources/views/admin/project/statistics.blade.php b/resources/views/admin/project/statistics.blade.php
index 51b3248b3..11963d137 100644
--- a/resources/views/admin/project/statistics.blade.php
+++ b/resources/views/admin/project/statistics.blade.php
@@ -63,9 +63,9 @@
@endsection
@push('scripts')
@if($transcribers->isNotEmpty())
-
-
-
+
+
@endif
@if(isset($transcriptions))
-
+ @include('common.amchart')
+ @vite('resources/js/amChartStat-entry.js')
@endif
@endpush
\ No newline at end of file
diff --git a/resources/views/admin/reconcile/index.blade.php b/resources/views/admin/reconcile/index.blade.php
index 6ce565fd0..6beabf883 100644
--- a/resources/views/admin/reconcile/index.blade.php
+++ b/resources/views/admin/reconcile/index.blade.php
@@ -145,6 +145,5 @@ class="btn btn-primary p-2 m-1 prevent-default text-uppercase"
@push('scripts')
-
-
+ @vite('resources/js/expertReview.js')
@endpush
\ No newline at end of file
diff --git a/resources/views/common/amchart.blade.php b/resources/views/common/amchart.blade.php
index 2473607ca..e96561bc2 100644
--- a/resources/views/common/amchart.blade.php
+++ b/resources/views/common/amchart.blade.php
@@ -1,7 +1,9 @@
+{{-- amCharts 4 for pages that draw charts. Include it before the page's chart bundle; pass ['maps' => true] for map charts. --}}
-
-
-
-
\ No newline at end of file
+@if($maps ?? false)
+
+
+
+@endif
diff --git a/resources/views/front/bingo/card.blade.php b/resources/views/front/bingo/card.blade.php
index 146e6ad10..056f65a53 100644
--- a/resources/views/front/bingo/card.blade.php
+++ b/resources/views/front/bingo/card.blade.php
@@ -14,7 +14,7 @@
@include('common.favicon')
-
+ @vite('resources/sass/front.scss')
@production
@include('common.google-analytics')
@endproduction
@@ -35,12 +35,10 @@
@include('front.bingo.partials.bingo-modal')
@include('common.php-vars-javascript')
-
-
-
-@include('common.amchart')
-
-
diff --git a/resources/views/front/bingo/show.blade.php b/resources/views/front/bingo/show.blade.php
index b9b8c384c..4100b6f53 100644
--- a/resources/views/front/bingo/show.blade.php
+++ b/resources/views/front/bingo/show.blade.php
@@ -35,9 +35,9 @@ class="my-0 mr-md-auto top-logo font-weight-normal"/>
@endsection
@push('scripts')
-
-
-
+
+
@endpush
diff --git a/resources/views/front/event/index.blade.php b/resources/views/front/event/index.blade.php
index cba959f9a..ebc4d4c34 100644
--- a/resources/views/front/event/index.blade.php
+++ b/resources/views/front/event/index.blade.php
@@ -27,7 +27,8 @@ class="my-0 mr-md-auto top-logo font-weight-normal"/>
@endsection
@push('scripts')
-
+ @include('common.amchart')
+ @vite('resources/js/amChartEventRate-entry.js')
+ @include('common.amchart')
+ @vite('resources/js/amChartEventRate-entry.js')
@endif
@endpush
diff --git a/resources/views/front/layout/default.blade.php b/resources/views/front/layout/default.blade.php
index 4ad0fb820..7a1c7d586 100644
--- a/resources/views/front/layout/default.blade.php
+++ b/resources/views/front/layout/default.blade.php
@@ -12,7 +12,7 @@
@include('common.favicon')
-
+ @vite('resources/sass/front.scss')
@stack('styles')
@production
@include('common.google-analytics')
@@ -126,10 +126,8 @@ class="figure-img"
@include('front.layout.contributors')
@endif
@include('common.php-vars-javascript')
-
-
-
-@include('common.amchart')
+@vite('resources/js/front-app.js')
+@vite('resources/js/amChartWeDigBioRate-entry.js')
@stack('scripts')