Add alpinejs to deferred scripts

This commit is contained in:
Cram42 2022-11-11 11:25:41 +08:00
parent 7108156072
commit 67d021e457
6 changed files with 11 additions and 5 deletions

View file

@ -29,6 +29,7 @@
"acorn-import-assertions": "^1.8.0", "acorn-import-assertions": "^1.8.0",
"admin-lte": "^2.4.18", "admin-lte": "^2.4.18",
"ajv": "^6.12.6", "ajv": "^6.12.6",
"alpinejs": "^3.10.5",
"blueimp-file-upload": "^9.34.0", "blueimp-file-upload": "^9.34.0",
"bootstrap": "^3.4.1", "bootstrap": "^3.4.1",
"bootstrap-colorpicker": "^2.5.3", "bootstrap-colorpicker": "^2.5.3",

BIN
public/js/dist/all-defer.js vendored Normal file

Binary file not shown.

View file

@ -35,6 +35,7 @@
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971", "/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2", "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",
"/js/dist/all.js": "/js/dist/all.js?id=c281e69bed1a5a386e8cbc611b9bf781", "/js/dist/all.js": "/js/dist/all.js?id=c281e69bed1a5a386e8cbc611b9bf781",
"/js/dist/all-defer.js": "/js/dist/all-defer.js?id=7d1b362ddda912bce36f333cd492191b",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=407f83d58689706f303a83e195f6c041", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=407f83d58689706f303a83e195f6c041",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c4c9c4304a3473e473774a45deee0a46", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c4c9c4304a3473e473774a45deee0a46",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=924fd5e1d5d41ffc483841a628eb9c58", "/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=924fd5e1d5d41ffc483841a628eb9c58",

View file

@ -887,6 +887,7 @@
{{-- Javascript files --}} {{-- Javascript files --}}
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script> <script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
<script defer src="{{ url(mix('js/dist/all-defer.js')) }}" nonce="{{ csrf_token() }}"></script>
<!-- v5-beta: This pGenerator call must remain here for v5 - until fixed - so that the JS password generator works for the user create modal. --> <!-- v5-beta: This pGenerator call must remain here for v5 - until fixed - so that the JS password generator works for the user create modal. -->
<script src="{{ url('js/pGenerator.jquery.js') }}"></script> <script src="{{ url('js/pGenerator.jquery.js') }}"></script>
@ -957,8 +958,7 @@
</script> </script>
@endif @endif
@livewireScripts @livewireScripts
</body> </body>
</html> </html>

View file

@ -1,7 +1,4 @@
@once @once
@push('js')
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
@endpush
@push('css') @push('css')
<style> <style>
:root { :root {

View file

@ -212,6 +212,13 @@ mix
) )
.version(); .version();
mix
.combine(
['./node_modules/alpinejs/dist/cdn.js'],
'./public/js/dist/all-defer.js'
)
.version();
/** /**
* Copy, minify and version skins * Copy, minify and version skins
*/ */