-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider removing the app.js file #2027
Comments
Claude Sonnet
Based on the provided code snippets, it appears that the
/*
* This is the main JavaScript used by Vite to build the app.js file.
*/
{{-- Alpine.js --}}
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.10.3/dist/cdn.min.js" integrity="sha256-gOkV4d9/FmMNEkjOzVlyM2eNAWSUXisT+1RbMTTIgXI=" crossorigin="anonymous"></script>
input: [
resolve(__dirname, 'resources/assets/app.js'),
resolve(__dirname, 'resources/assets/app.css')
],
public function testLaravelMixResourcesArePresent()
{
$this->assertFileExists(Hyde::path('resources/assets/app.css'));
$this->assertFileExists(Hyde::path('resources/assets/app.js'));
$this->assertFileContainsString('@tailwind base;', Hyde::path('resources/assets/app.css'));
$this->assertFileContainsString('@tailwind components;', Hyde::path('resources/assets/app.css'));
$this->assertFileContainsString('@tailwind utilities;', Hyde::path('resources/assets/app.css'));
$this->assertFileContainsString('This is the main JavaScript', Hyde::path('resources/assets/app.js'));
} Recommendation:
However, you might want to keep the empty file as a convenience for users who want to add their own JavaScript in the future, since the build pipeline is already set up to handle it. This follows Hyde's philosophy of being ready for customization while not requiring it. |
Okay, in #2028 we will keep the app.js in resources to keep it easily available, but we won't compile the empty file. So that resolves the annoyance here. |
Do we actually need the app.js file? We just use Alpine at the moment, so it's empty by default. The app.css file at least loads Tailwind.
The text was updated successfully, but these errors were encountered: