diff --git a/src/Bundlers/Bun.php b/src/Bundlers/Bun.php index 04da490..4bcdff5 100644 --- a/src/Bundlers/Bun.php +++ b/src/Bundlers/Bun.php @@ -27,7 +27,7 @@ public function build(string $inputPath, string $outputPath, string $fileName): '--target' => 'browser', '--root' => $inputPath, '--format' => 'esm', - // '--sourcemap=inline', // Maybe only locally? + // '--sourcemap=external', // Maybe only locally? // '--splitting', // Breaks relative paths to imports from resources/js (TODO: Experiment more after writing tests) '--minify' // Only in production? ]; diff --git a/src/Components/Bundle.php b/src/Components/Bundle.php index 5ab3662..615f846 100644 --- a/src/Components/Bundle.php +++ b/src/Components/Bundle.php @@ -19,7 +19,7 @@ public function render() // and assign the import to that object. // --------------------------------------------- // Then we expose a _bundle function that - // can retreive the module as a Promis + // can retreive the module as a Promise $js = <<< JS if(!window._bundle_modules) window._bundle_modules = {} window._bundle_modules.$this->as = import('$this->import') diff --git a/resources/components/bundle.blade.php b/src/Components/views/bundle.blade.php similarity index 100% rename from resources/components/bundle.blade.php rename to src/Components/views/bundle.blade.php diff --git a/src/Contracts/Directive.php b/src/Contracts/Directive.php deleted file mode 100644 index a640a3b..0000000 --- a/src/Contracts/Directive.php +++ /dev/null @@ -1,8 +0,0 @@ -loadViewsFrom(__DIR__.'/../resources/components', 'bundle'); + $this->loadViewsFrom(__DIR__.'/Components/views', 'bundle'); Blade::component('bundle', Bundle::class); }