You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, i want to use this nice package, but the autoload doesnt work. It only works if i include the script tags manually. How can we fix this? My files:
constmix=require('laravel-mix');require("./vendor/nickpoulos/laravel-svelte-direct/src/js/mix");/* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel applications. By default, we are compiling the CSS | file for the application as well as bundling up all the JS files. | */mix.js('resources/js/app.js','public/js').postCss('resources/css/app.css','public/css',[//]);mix.svelteDirect("resources/js/svelte","public/js");
<!doctype html>
<html>
<head>
<title>My Example App</title>
</head>
<body>
<divclass="container">
<!-- example Svelte components here -->
<hello-world></hello-world>
<!-- end components -->
</div>
<scripttype="text/javascript">
// tie your components together using vanilla js or something ike alpine
</script>
<!-- START Svelte Direct Component JavaScript -->@stack('sveltedirect')
<!-- END Svelte Direct Component JavaScript -->
</body>
</html>
This blade file works (because i require the file from public/js/hello-world.js manually:
<!doctype html>
<html>
<head>
<title>My Example App</title>
<scriptsrc="{{asset("js/hello-world.js") }}"></script>
</head>
<body>
<divclass="container">
<!-- example Svelte components here -->
<hello-world></hello-world>
<!-- end components -->
</div>
<scripttype="text/javascript">
// tie your components together using vanilla js or something ike alpine
</script>
<!-- START Svelte Direct Component JavaScript -->@stack('sveltedirect')
<!-- END Svelte Direct Component JavaScript -->
</body>
</html>
The text was updated successfully, but these errors were encountered:
Hey, i want to use this nice package, but the autoload doesnt work. It only works if i include the script tags manually. How can we fix this? My files:
This blade file works (because i require the file from public/js/hello-world.js manually:
The text was updated successfully, but these errors were encountered: