diff --git a/.babelrc b/.babelrc
index 8bafa56b4..e17a11004 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,6 +1,7 @@
{
"presets": [
- "@babel/preset-env"
+ "@babel/preset-env",
+ "minify"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread"
diff --git a/app/Services/Helpers/AssetHashService.php b/app/Services/Helpers/AssetHashService.php
index 3f721c409..89564ff78 100644
--- a/app/Services/Helpers/AssetHashService.php
+++ b/app/Services/Helpers/AssetHashService.php
@@ -58,8 +58,25 @@ class AssetHashService
public function url(string $resource): string
{
$file = last(explode('/', $resource));
+ $data = array_get($this->manifest(), $file, $file);
- return '/' . ltrim(str_replace($file, array_get($this->manifest(), $file, $file), $resource), '/');
+ return '/' . ltrim(str_replace($file, array_get($data, 'src', $file), $resource), '/');
+ }
+
+ /**
+ * Return the data integrity hash for a resource.
+ *
+ * @param string $resource
+ * @return string
+ *
+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
+ */
+ public function integrity(string $resource): string
+ {
+ $file = last(explode('/', $resource));
+ $data = array_get($this->manifest(), $file, $file);
+
+ return array_get($data, 'integrity', '');
}
/**
@@ -72,7 +89,11 @@ class AssetHashService
*/
public function css(string $resource): string
{
- return '';
+ return '';
}
/**
@@ -85,7 +106,9 @@ class AssetHashService
*/
public function js(string $resource): string
{
- return '';
+ return '';
}
/**
diff --git a/resources/themes/pterodactyl/templates/wrapper.blade.php b/resources/themes/pterodactyl/templates/wrapper.blade.php
index 1a03ee2fa..9f8d8d50a 100644
--- a/resources/themes/pterodactyl/templates/wrapper.blade.php
+++ b/resources/themes/pterodactyl/templates/wrapper.blade.php
@@ -10,7 +10,7 @@
@show
@section('assets')
- {!! $asset->css('assets/bundle.css') !!}
+ {!! $asset->css('main.css') !!}
@show
@include('layouts.scripts')
@@ -24,7 +24,7 @@
@yield('below-container')
@show
@section('scripts')
- {!! $asset->js('assets/bundle.js') !!}
+ {!! $asset->js('main.js') !!}
@show