-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixes assetQueryParams and public folder tests #14853
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
Changes from all commits
ca24f83
78d353b
36cfa18
4baf374
3dc5d50
7a130c0
459897a
b76bfd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import type * as vite from 'vite'; | ||
|
|
||
| export const NOOP_MODULE_ID = 'virtual:astro:noop'; | ||
| const RESOLVED_NOOP_MODULE_ID = '\0' + NOOP_MODULE_ID; | ||
|
|
||
| // An empty module that does nothing. This can be used as a placeholder | ||
| // when you just need a module to be in the graph. | ||
| // We use this for the client build when there are no client modules, | ||
| // because the publicDir copying happens in the client build. | ||
| export function pluginNoop(): vite.Plugin { | ||
| return { | ||
| name: 'plugin-noop', | ||
| resolveId(id) { | ||
| if(id === NOOP_MODULE_ID) { | ||
| return RESOLVED_NOOP_MODULE_ID; | ||
| } | ||
| }, | ||
| load(id) { | ||
| if(id === RESOLVED_NOOP_MODULE_ID) { | ||
| return ''; | ||
| } | ||
| }, | ||
| generateBundle(_options, bundle) { | ||
| // Delete this bundle so that its not written out to disk. | ||
| for(const [name, chunk] of Object.entries(bundle)) { | ||
| if(chunk.type === 'asset') continue; | ||
| if(chunk.facadeModuleId === RESOLVED_NOOP_MODULE_ID) { | ||
| delete bundle[name]; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,10 +148,4 @@ describe('Astro.params in static mode', () => { | |
| const $ = cheerio.load(html); | ||
| assert.equal($('.category').text(), '%3Fsomething'); | ||
| }); | ||
|
|
||
| it("It doesn't encode/decode URI characters such as %25 (%)", async () => { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is removed because we can no longer support this. The reason this worked before was we used the result of getStaticPaths during static builds directly. Now we produce paths and send the requests through These are not encoded in SSR so they no longer can be in static.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This requires a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added an issue to the board |
||
| const html = await fixture.readFile(encodeURI('/%25something/index.html')); | ||
| const $ = cheerio.load(html); | ||
| assert.equal($('.category').text(), '%25something'); | ||
| }); | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.