-
Notifications
You must be signed in to change notification settings - Fork 89
feat: workflow/vite plugin
#172
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
11e8b68
feat: nitro+vite support and workbench
pi0 f98ddd1
update package.json files
pi0 14379c8
test: add local-build test for vite
pi0 ceaf5c2
update to vite plugin
pi0 002b34e
fix imports
pi0 c3bc86c
dedup nitro
pi0 74b9f7e
update
pi0 9a9a489
update nitro
pi0 1990543
allow passing options via plugin
pi0 fcaa999
Update packages/nitro/src/vite.ts
pi0 71e7afb
test: add vite tests
adriandlam 6d4d939
trigger ci
adriandlam e0b3a37
fix: missing js extension from builder and rollup
adriandlam 2de7f64
refactor: move debug => unenv under vite plugin
pi0 18a8560
alternative workaround
pi0 1c40ac4
Update packages/nitro/src/vite.ts
adriandlam 29ec89f
rename plugin
pi0 83c2417
Update packages/cli/package.json
adriandlam 41b5f5e
lockfile
adriandlam 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import type { Plugin } from 'vite' | ||
| import type { ModuleOptions } from './index.js' | ||
| import type { Nitro } from 'nitro/types'; | ||
| import { workflowRollupPlugin } from './rollup-plugin.js'; | ||
| import nitroModule from './index.js' | ||
|
|
||
| export function workflow(options?: ModuleOptions): Plugin[] { | ||
| return [ | ||
| workflowRollupPlugin(), | ||
| { | ||
| name: 'workflow:nitro', | ||
| // Requires https://github.com/nitrojs/nitro/discussions/3680 | ||
| // @ts-ignore | ||
| nitro: { | ||
| setup: (nitro: Nitro) => { | ||
| nitro.options.workflow = { ...nitro.options.workflow, ...options, _vite: true } | ||
| return nitroModule.setup(nitro) | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { workflow } from '@workflow/nitro/vite'; |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can change this to just
/rollupin this PR if we want. might as well make the change now before waiting too longI am worried we're polluting the
workflowpackage with too many framework builders but we can break it apart in a future major release. changingworkflow/nitroto@workflow/nitrois a pretty simple codemod