-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Migrate from webpack to vite #37002
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
Merged
Merged
Migrate from webpack to vite #37002
Changes from 116 commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
d99e932
Migrate from webpack to Vite 8
silverwind 89b16a1
Use content-hashed filenames with Vite manifest for cache busting
silverwind 90374c1
Hash all asset filenames and remove AssetVersion
silverwind a3d579e
Merge branch 'main' into vite
silverwind dea0436
Rename template helper `AssetPath` to `GetAssetPath` and clean up
silverwind 581bd1b
cleanup
silverwind a419e10
Fix webcomponents manifest entry not written
silverwind e701562
inline
silverwind 2a198b0
Remove duplicate `webcomponents-blocking.ts`
silverwind 6533de7
Address review comments on `vite.config.ts`
silverwind e9554c7
Add upstream issue link for ENABLE_SOURCEMAP comment
silverwind df3c17a
add ref
silverwind 6215c5e
Simplify ENABLE_SOURCEMAP handling
silverwind d6b34b3
Restore ENABLE_SOURCEMAP=reduced mode with Vite plugin
silverwind 17ab78e
Restore original ENABLE_SOURCEMAP variable names from webpack config
silverwind c160f2b
Merge branch 'main' into vite
silverwind 5fb3d15
Update modules/public/manifest.go
silverwind c52a9da
Restore ENABLE_SOURCEMAP=reduced mode with Vite plugin
silverwind 3fcea7d
Apply suggestion from @silverwind
silverwind 4a83e14
Build index.js as blocking IIFE, load index-domready as deferred module
silverwind 43df852
Use global jQuery, remove jquery-global plugin, simplify CSS handling
silverwind e13f106
Use AssetFS() for Vite manifest reading
silverwind 745cc7d
Simplify manifest loading, remove htmx from IIFE
silverwind 70568dd
Use Vite's Manifest type for manifest handling
silverwind e0b1ad8
Add jQuery to vitest setup for global $ in tests
silverwind 14744ac
Update stale webpack references to vite
silverwind ef8811f
forbid jquery imports because of single global instance
silverwind fee04f3
Suppress plugin timing warnings for worker builds
silverwind 93ce326
Extract shared rolldownOptions for main, IIFE and worker builds
silverwind ae24785
use function
silverwind b5d5e46
Remove reduced sourcemap mode, simplify to true/false
silverwind bc05ab5
fix comment
wxiaoguang 467dde9
add jQuery check to devtest page
wxiaoguang 6ae005d
Use atomic.Pointer for manifest state to fix data race in dev mode
silverwind f3a8a19
Move htmx to IIFE globals, forbid `htmx.org` imports
silverwind e66d7b4
eslint tweaks
silverwind f0cf85d
C O M M E N T
wxiaoguang be08926
Stub XPathEvaluator in vitest setup for htmx compatibility
silverwind 1487b7a
fix parseManifest
wxiaoguang 1efff94
Stub XPathEvaluator in vitest setup for htmx compatibility
silverwind 412ba3c
Merge tiny mermaid parser chunks via `manualChunks`
silverwind 303328b
fix lint
silverwind 18070c4
Use `codeSplitting` instead of deprecated `manualChunks`
silverwind c098499
Merge mermaid diagram chunks into single `mermaid-core` chunk
silverwind 9ff8789
Remove redundant `minSize: 0` from mermaid-core group
silverwind 4c5b77c
Remove unnecessary priority from vue-runtime group
silverwind c6f6ea8
add UnencryptedHTTP2
wxiaoguang 2040535
Merge mermaid chunks without making them static imports
silverwind 592b67b
fmt
silverwind e768b5c
comment
silverwind 89f8907
Remove shared chunk dependencies from swagger entry
silverwind 1dacad8
Move relative-time to own
silverwind 93e92fa
Clean up vite config
silverwind 80a31ec
Add citation-js codeSplitting group, update comment
silverwind f9201be
Merge branch 'main' into vite
silverwind 2101c2e
explicit minify
silverwind 0648217
Restore process.env.NODE_ENV define for IIFE build, remove citation-j…
silverwind 4746fdd
Merge remote-tracking branch 'origin/main' into vite
silverwind 4797006
Remove stale fomantic.css import
silverwind 8bbb950
Merge remote-tracking branch 'origin/main' into vite
silverwind 687dfd3
Merge branch 'main' into vite
silverwind d890d9a
Apply suggestion from @silverwind
silverwind 16eaa6c
Apply suggestion from @silverwind
silverwind e9df9c2
disable custom codeSplitting
silverwind 5e037c8
Increase default `STATIC_CACHE_TIME` from 6h to 30 days
silverwind f0d12ba
Rename index-domready to index, index to iife
silverwind 11d0561
Merge branch 'main' into vite
silverwind efb2a40
Remove unnecessary renderBuiltUrl hook
silverwind 3952938
Move base option into commonViteOpts
silverwind 77a7e31
Restore initGlobalErrorHandler as side effect in bootstrap.ts
silverwind 0c625ab
Update services/webtheme/webtheme.go
wxiaoguang 8146f74
fine tune iife and global error handling
wxiaoguang 6b576a1
Merge branch 'main' into vite
wxiaoguang e81cda9
show the importance of "do not import a module twice"
wxiaoguang 88ac604
Revert default `STATIC_CACHE_TIME` back to 6h
silverwind 6a4b3ef
Replace tippy.js with custom popup in overflow-menu
silverwind b7a2b0a
Extract `showGlobalErrorMessage` to `modules/message.ts`
silverwind 46f6a7e
Move error handling functions to `modules/errors.ts`
silverwind a6ed941
Merge branch 'main' into vite
silverwind 31ac727
Merge remote-tracking branch 'origin/main' into vite
silverwind deb54ff
update vite
silverwind 77921c8
Add Vite dev server mode with reverse proxy
silverwind a6f4c7b
Migrate all asset URLs to AssetURL, remove pre-build step
silverwind 9b0c5f2
Rename AssetURL to AssetPath, unexport GetAssetPath
silverwind 1b18e4d
Fix test function name to satisfy Go naming convention
silverwind 8220760
Use manifest for theme name resolution, support custom themes in dev …
silverwind 79ca39c
Merge remote-tracking branch 'origin/main' into vite
silverwind 084ffd5
Fix shared worker path, rename back to eventsource.sharedworker
silverwind 836c1bf
Refactor getManifestPaths to getManifestData
silverwind 98c081a
remove unneeded arg
silverwind 937ee84
clarify hashed path, origin path, asset path, asset name
wxiaoguang 55e9840
clean up
wxiaoguang 4bf588b
fix test
wxiaoguang 6ec7ab3
Merge branch 'main' into vite
silverwind 31e833a
Clean up isViteDevRequest: remove ?raw, keep ?import
silverwind f881422
Rename AssetPath to AssetURI
silverwind 85f2c97
Scope ?import check to /assets/ and /public/assets/ paths
silverwind 642f0d3
Restore ENABLE_SOURCEMAP=reduced support
silverwind 6267fc5
remove "/assets/" check, rename sharedWorkerPath to sharedWorkerUri
wxiaoguang 4930648
fix comment
wxiaoguang 38c6a56
break middleware chain-call when the request should be handled by vit…
wxiaoguang c8dfb5a
fix comment
wxiaoguang 779ef1f
Merge branch 'main' into vite
wxiaoguang bf007fe
mark vite connection as long polling to avoid error logs
wxiaoguang 60b8de1
fix ViteDevMiddleware
wxiaoguang 9345dc1
avoid vite request log flood
wxiaoguang 90f7a54
fine tune vite dev proxy
wxiaoguang 6db4523
add debug header and error response for vite proxy
wxiaoguang 147197c
tell developers to run make watch-frontend
wxiaoguang 7ab77f0
unify script importing
wxiaoguang 64b4969
security
wxiaoguang 690ca24
fix lint
wxiaoguang f8f9fb1
fix lint
wxiaoguang bc22661
Merge branch 'main' into vite
wxiaoguang 214ab0c
Remove Gitpod integration
silverwind ca37154
Merge branch 'main' into vite
GiteaBot f2d119a
Apply suggestion from @silverwind
silverwind 743458b
Merge branch 'main' into vite
GiteaBot 1027575
Merge branch 'main' into vite
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.