Merged
Conversation
2e68caa to
ca1f7f0
Compare
7fc8a46 to
9d195b8
Compare
.✓✓..✓...✓.✓.✓..........✓...✓..✓✓....................✓.....✓........✓..✓.... .................✓..✓..........✓........ ──────────────────────────────────────────────────────────────────── Laravel FIXED ................................. 116 files, 17 style issues fixed ✓ src/Collection/Collection.php new_with_parentheses, unary_operator_spaces… ✓ src/Console/BuildCommand.php new_with_parentheses, unary_operator_spaces,… ✓ src/Events/EventBus.php new_with_parentheses ✓ src/File/TemporaryFilesystem.php new_with_parentheses ✓ src/Scaffold/PresetPackage.php new_with_parentheses, unary_operator_space… ✓ src/SiteData.php new_with_parentheses ✓ src/Support/helpers.php new_with_parentheses, no_superfluous_phpdoc_tags,… ✓ tests/CustomCommandTest.php new_with_parentheses ✓ tests/CustomScaffoldInstallerTest.php new_with_parentheses ✓ tests/DefaultScaffoldInstallerTest.php new_with_parentheses ✓ tests/DotInFileNameTest.php new_with_parentheses ✓ tests/FilePathTest.php new_with_parentheses ✓ tests/InitCommandTest.php new_with_parentheses ✓ tests/PhpOpenTagInMarkdownTest.php new_with_parentheses ✓ tests/PresetScaffoldBuilderTest.php new_with_parentheses ✓ tests/SnapshotsTest.php new_with_parentheses, php_unit_method_casing, una… ✓ tests/TestCase.php new_with_parentheses, class_definition, braces_positio… )
nicodevs
approved these changes
Mar 7, 2025
Contributor
nicodevs
left a comment
There was a problem hiding this comment.
Code looks good! (Many changes were just for code styling and format fixes.)
I followed the steps in the PR and got Jigsaw up and running with Vite. HMR worked as expected.
Excited to see Vite replacing Mix/Webpack in Jigsaw!
Contributor
|
@gcavanunez I'm working on a PR to update the stubs. I'll let you know when it's done so we can merge it into this branch. |
..✓..............✓.✓..............✓......................................... ........................................ ──────────────────────────────────────────────────────────────────── Laravel FIXED .................................. 116 files, 4 style issues fixed ✓ tests/FilesystemTest.php php_unit_method_casing ✓ tests/HelpersTest.php php_unit_method_casing ✓ tests/IterableObjectTest.php class_definition, php_unit_method_casing, br… ✓ tests/PaginationTest.php php_unit_method_casing )
Contributor
|
I would love if this gets merged, so that I could switch to vite for my jigsaw pages. |
Contributor
|
How can we help get this over the line? |
Contributor
|
I'll look this over today and get it merged! |
Contributor
|
Thanks a bunch for the work and merging this. Will the documentation get a section on how to upgrade to vite? I'm having troubles getting it to work, running into problems with postcss-import |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Highlights
@viteRefresh()blade directive for the purpose of adding the vite client scriptvitehelper methods that play a similar role to themixhelper methodHow to Test
Here's a sample repo of the integration working.
Steps by step
mkdir jigsaw-vite && cd jigsaw-vitecomposer require tightenco/jigsaw:dev-gc/add-vitevendor/bin/jigsaw initnpm i -D vite @tighten/jigsaw-vite-plugin"type": "module"to yourpackage.jsonvite.config.jspackage.jsonand in the
postcss.config.jsshould look like:source/_layouts/main.blade.php- here we're adding the@viteRefresh& the link + script tag, while removing themixrelated codenpm run dev- and either access it via valet atjigsaw-vite.testor run./vendor/bin/jigsaw serveNotes
Was initially leaning into mocking the
hotFilePath()from theViteclass however it started to feel a little gross vs setting up thesourceproj and leaning intocreateSource(..). ThecreateSourcehelps plays a similar role to how Laravel's Vite integration mocked the Filesystem.Though arguably now it could be strictly a few helper functions or static methods in Vite class, I do like leaning into the Container to access the Vite methods