Vite migration#13
Open
stefnotch wants to merge 10 commits into
Open
Conversation
d30a73c to
b355358
Compare
51fa395 to
330cb68
Compare
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.
Fix #8
Fix #9
This PR is split up into commits to make reviewing more straightforward.
The first commit does the following
srcfolder. That's what vite's default config expectsjsconfigtotsconfig. It semantically remains the same thing and we still use just Javascript. This renaming is just because IIRC, vite first looks for a tsconfig.gitignoreThe next commit adds vite
package.jsonwith viteThen I make use of npm
Now I can finally make use of ES modules
index.htmlfile no longer directly references the scripts. Instead each script hasimportstatements.import { LOADER } from "../src/loader";But we need absolute paths so that we can copy paste the solutions. So I do a bit of configuration in thetsconfigand in vite to make that work.Change shaders to
.wgsl.wgslfiles!import { Tutorial } from "./tasks/task3.js";in theindex.htmlfileimport heatmapCompute from "././shaders/heatmapCompute.wgsl" with { type: "text" };instead of the vite specific?raw. But it'll take a while longer for those text import statements to get widely adopted.)And load the dataset from the local server
Then I do a quick edit to the readme.
And finally, I move our final dependency to npm