astro/packages/astro/test
Matthew Phillips 40226dd14d
Use Vite to load non JS astro configs (#5377)
* Use Vite to load non JS astro configs

* Adding a changeset

* Allow config to not exist

* Use a file url

* Use proload as a fallback

* add missing peerdep

* fix lint mistakes

* Refactor the vite-load

* First check if the file exists

* Pass through fs

* Update packages/astro/src/core/config/vite-load.ts

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Also load astro.config.cjs

* Do search before trying to load

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-11-15 10:02:23 -05:00
..
benchmark Node.js standalone mode + support for astro preview (#5056) 2022-10-12 17:25:51 -04:00
fixtures Use Vite to load non JS astro configs (#5377) 2022-11-15 10:02:23 -05:00
units Use Vite to load non JS astro configs (#5377) 2022-11-15 10:02:23 -05:00
0-css.test.js Use new compiler resolvePath option (#5133) 2022-10-21 14:08:07 +08:00
alias-tsconfig.test.js Fixes using tsconfig to set aliases (#4010) 2022-07-21 13:45:20 -04:00
alias.test.js Fix tests: remove it.only (#3394) 2022-05-18 08:27:52 -04:00
api-routes.test.js Remove shamefully-hoist (#4842) 2022-09-28 23:13:33 +08:00
asset-url-base.test.js [ci] format 2022-11-11 19:36:40 +00:00
astro-assets.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-attrs.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-basic.test.js fix: properly handle scoped class injection with spread attributes (#3384) 2022-05-24 11:58:21 -05:00
astro-children.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-class-list.test.js Handle false properly in class:list (#3922) 2022-07-14 12:01:17 -05:00
astro-client-only.test.js Fixes client:only CSS in Svelte components (#4782) 2022-09-17 12:32:35 -04:00
astro-component-code.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-cookies.test.js [ci] format 2022-09-28 20:57:35 +00:00
astro-css-bundling.test.js [ci] format 2022-11-10 22:14:23 +00:00
astro-directives.test.js Upgrade compiler (#5339) 2022-11-09 12:55:52 -06:00
astro-doctype.test.js Update compiler version (#4175) 2022-08-05 17:41:35 -04:00
astro-dynamic.test.js Inline small hoisted scripts (#3658) 2022-06-22 12:02:42 -04:00
astro-envs.test.js [ci] format 2022-07-18 15:35:14 +00:00
astro-expr.test.js Fix slot attribute inside expressions (#3837) 2022-07-07 13:23:51 -05:00
astro-external-files.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
astro-fallback.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-generator.test.js Add Astro.generator (#4012) 2022-08-08 12:34:05 -05:00
astro-get-static-paths.test.js Fix getStaticPaths regressions with nested arrays (#5375) 2022-11-11 17:50:40 -04:00
astro-global.test.js Properly support trailingSlash: never with a base (#5358) 2022-11-11 08:28:29 -08:00
astro-head.test.js Ensure that maybeRenderHead runs last (#3821) 2022-07-06 08:10:19 -04:00
astro-markdown-css.test.js Fix duplicate CSS in dev mode (#4157) 2022-08-05 13:36:03 -05:00
astro-markdown-drafts.test.js [ci] format 2022-06-21 12:33:55 +00:00
astro-markdown-frontmatter-injection.test.js [ci] format 2022-08-05 23:58:09 +00:00
astro-markdown-plugins.test.js [ci] format 2022-08-25 21:24:13 +00:00
astro-markdown-remarkRehype.test.js make Remark rehype options available in astro config (#4138) 2022-08-25 16:30:16 -04:00
astro-markdown-shiki.test.js Move the Markdown component to its own package (#3986) 2022-07-20 16:45:05 -04:00
astro-markdown-url.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-markdown.test.js Update Markdown type signature to match behavior (#4423) 2022-08-25 17:08:43 -04:00
astro-not-response.test.js add double check on astro file return type to display more human readable error (#4857) 2022-09-26 14:13:25 -04:00
astro-object-style.test.js fix object styles not escaped (#4887) 2022-10-04 12:56:11 -04:00
astro-pageDirectoryUrl.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
astro-pages.test.js [ci] format 2022-05-16 18:45:15 +00:00
astro-pagination.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
astro-partial-html.test.js Fix duplicate CSS in dev mode (#4157) 2022-08-05 13:36:03 -05:00
astro-public.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
astro-response.test.js Streaming (#3696) 2022-06-24 15:35:21 -04:00
astro-scripts.test.js [ci] update lockfile (#5382) 2022-11-12 07:34:33 -08:00
astro-slot-with-client.test.js Yield out potentional slot instructions when rendering dynamic tags (#4981) 2022-10-05 16:30:43 -04:00
astro-slots-nested.test.js Ensure astro-island scripts render when using Astro.slots.render (#5326) 2022-11-08 12:15:32 -05:00
astro-slots.test.js Allow passing promises to set:html (#4819) 2022-09-20 13:13:21 -04:00
before-hydration.test.js [ci] format 2022-09-15 16:36:38 +00:00
cli.test.js E2E stability (#5002) 2022-10-06 16:32:37 -04:00
client-address.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
code-component.test.js Moves Debug component's styles to be inlined (#3963) 2022-07-18 16:42:57 -04:00
component-library.test.js Fix duplicate CSS in dev mode (#4157) 2022-08-05 13:36:03 -05:00
config-mode.test.js Refactor to remove AstroConfig['_ctx'] (#4771) 2022-09-16 11:29:17 -04:00
config-vite-css-target.test.js Add vite.build.cssTarget support for CSS build (#4155) 2022-08-04 14:39:43 -05:00
config-vite.test.js [ci] format 2022-05-26 18:01:35 +00:00
css-assets.test.js [ci] format 2022-05-26 18:01:35 +00:00
css-no-code-split.test.js Support vite.build.cssCodeSplit: false option (#4458) 2022-08-25 16:34:13 +08:00
css-order-import.test.js [ci] format 2022-09-28 22:14:18 +00:00
css-order.test.js Fix CSS ordering between imported and Astro styles (#4907) 2022-09-28 18:12:22 -04:00
custom-404-md.test.js Matching custom 404 pages using the manifest's route patterns (#3390) 2022-05-17 21:27:06 +00:00
custom-404.test.js Replace/Rename Astro.canonicalURL with new Astro.url helper (#3959) 2022-07-21 13:45:59 -04:00
custom-elements.test.js Support re-exporting astro components containing client components (#3625) 2022-06-21 08:32:05 -04:00
debug-component.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
dev-routing.test.js [ci] format 2022-11-11 16:04:21 +00:00
dont-delete-root.test.js [ci] format 2022-09-22 20:39:53 +00:00
dynamic-route-build-file.test.js [ci] format 2022-10-19 14:03:14 +00:00
entry-file-names.test.js [ci] format 2022-06-22 16:33:56 +00:00
error-bad-js.test.js [ci] format 2022-09-12 18:43:54 +00:00
error-non-error.test.js Fix errors that are not instanceof Error crashing the dev server (#5216) 2022-10-27 15:44:48 -03:00
events.test.js Migrate error messages to new format (and misc error improvements) (#5316) 2022-11-09 11:53:42 -04:00
fetch.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
fontsource.test.js Fix importing CSS packages in frontmatter (#3537) 2022-06-06 18:26:15 -04:00
get-static-paths-pages.test.js Ensure index pages are generated on paginated results (#4426) 2022-08-23 08:47:20 -04:00
glob-pages-css.test.js [ci] format 2022-08-05 13:53:50 +00:00
head-injection-md.test.js Fix double injecting of head content in md pages (#4334) 2022-08-15 13:10:28 -04:00
html-component.test.js Add .html support (#3867) 2022-07-22 10:32:36 -05:00
html-escape.test.js [ci] format 2022-07-22 15:34:44 +00:00
html-page.test.js [ci] format 2022-07-22 15:34:44 +00:00
html-slots.test.js Add .html support (#3867) 2022-07-22 10:32:36 -05:00
hydration-race.test.js Revert "Ensure hydration scripts inside of slots render ASAP (#4288)" (#4302) 2022-08-13 10:00:12 -07:00
import-ts-with-js.test.js Allow importing .ts files with .js extension (#3518) 2022-06-03 13:00:28 -04:00
impostor-mdx-file.js Fix memleak when project path contains '.md' (#5264) 2022-11-02 20:43:36 +08:00
integration-add-page-extension.test.js Add private addPageExtension hook (#3628) 2022-06-20 14:05:16 -05:00
jsx.test.js [ci] format 2022-06-24 20:13:12 +00:00
lazy-layout.test.js Ensure head content rendered once with lazy layouts (#4892) 2022-09-28 10:55:06 -04:00
legacy-astro-flavored-markdown.test.js [markdown] Harder, better, faster, stronger vite-plugin-markdown (#4137) 2022-08-05 15:43:50 -04:00
lit-element.test.js Move getStaticPaths call to happen during generation (#4047) 2022-07-26 08:54:49 -04:00
markdown.test.js feat: add support for other markdown file extensions (#5164) 2022-10-26 10:18:49 -04:00
multiple-renderers.test.js Only rethrow renderer error when no renderer found (#4131) 2022-08-03 14:33:31 -04:00
non-ascii-path.test.js Fix slashes for paths containing non-ASCII characters on Windows. (#4712) 2022-09-22 14:33:28 -04:00
non-html-pages.test.js Add support for custom non-html route encoding (#4549) 2022-09-09 11:58:24 -04:00
page-format.test.js [ci] format 2022-08-25 19:23:09 +00:00
page-level-styles.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
postcss.test.js Overhaul HMR handling for .astro files (#3932) 2022-07-22 13:37:20 -05:00
preact-compat-component.test.js Fix preact compat support for libraries (#4213) 2022-08-10 22:22:10 +08:00
preact-component.test.js Revert "Revert preact signals support (#4843)" (#5015) 2022-10-10 09:01:15 -04:00
preview-routing.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
public-base-404.test.js [ci] format 2022-07-21 17:39:31 +00:00
react-and-solid.test.js Read jsxImportSource from tsconfig (#4759) 2022-09-15 09:50:48 -04:00
react-component.test.js Prevent errors in React components from crashing the dev server (#4816) 2022-09-20 09:38:17 -04:00
react-jsx-export.test.js Skip JSX tagging for export statements with source (#5057) 2022-10-12 08:25:54 -04:00
reexport-astro-containing-client-component.test.js Support re-exporting astro components containing client components (#3625) 2022-06-21 08:32:05 -04:00
remote-css.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
root-srcdir-css.test.js [ci] format 2022-11-04 13:11:59 +00:00
route-manifest.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
routing-priority.test.js Support spread parameters for server endpoints (#5106) 2022-10-18 13:16:24 +08:00
serialize.test.js [ci] format 2022-09-21 16:23:49 +00:00
set-html.test.js [ci] format 2022-09-21 23:09:40 +00:00
slots-preact.test.js Feat: new legacy.astroFlavoredMarkdown flag (#4016) 2022-07-22 22:45:16 +00:00
slots-react.test.js Support Astro.slots.render for mdx (#4973) 2022-10-04 10:18:34 -04:00
slots-solid.test.js Feat: new legacy.astroFlavoredMarkdown flag (#4016) 2022-07-22 22:45:16 +00:00
slots-svelte.test.js Feat: new legacy.astroFlavoredMarkdown flag (#4016) 2022-07-22 22:45:16 +00:00
slots-vue.test.js Feat: new legacy.astroFlavoredMarkdown flag (#4016) 2022-07-22 22:45:16 +00:00
solid-component.test.js Support rendering @motionone/solid components (#5233) 2022-10-28 10:42:37 -04:00
sourcemap.test.js Fix client build sourcemap generation (#4195) 2022-08-08 21:55:18 +08:00
special-chars-in-component-imports.test.js Correctly escape paths in file names (#4584) 2022-09-04 16:43:47 +08:00
ssr-404-500-pages.test.js [ci] format 2022-09-14 19:49:26 +00:00
ssr-adapter-build-config.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-api-route.test.js Add new fields to API route context (#4986) 2022-10-12 17:03:49 -04:00
ssr-assets.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-dynamic.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-env.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-hoisted-script.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-large-array.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-lit.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-markdown.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-partytown.test.js [ci] format 2022-07-25 04:20:38 +00:00
ssr-redirect.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
ssr-request.test.js [ci] format 2022-11-11 19:36:40 +00:00
ssr-response.test.js Revert "Revert preact signals support (#4843)" (#5015) 2022-10-10 09:01:15 -04:00
ssr-scripts.test.js Add the output option (#4015) 2022-07-25 00:18:02 -04:00
static-build-code-component.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
static-build-dir.test.js Adds a new "astro:build:generated" hook for SSG builds (#4775) 2022-09-21 17:13:36 +00:00
static-build-frameworks.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
static-build-page-dist-url.test.js Enables eslint on the full repo and adds a rule for no only() tests (#3659) 2022-06-22 15:59:49 +00:00
static-build-page-url-format.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
static-build.test.js remove unused util polyfill dependency (#4097) 2022-08-01 09:15:23 -07:00
status-page.test.js Migrate to new config (#2962) 2022-04-02 12:29:59 -06:00
streaming.test.js [ci] format 2022-07-25 04:20:38 +00:00
svelte-component.test.js chore: remove deprecation message when using cheerio's default export (#3225) 2022-04-27 15:43:31 -03:00
tailwindcss.test.js add support for injected page-ssr scripts (#4050) 2022-07-26 00:26:47 -04:00
test-adapter.js Handle base in adapters (#5290) 2022-11-07 10:05:12 -05:00
test-utils.js [ci] format 2022-11-03 15:33:10 +00:00
third-party-astro.test.js Improve third-party Astro package support (#4623) 2022-09-06 19:04:56 +02:00
type-imports.test.js fix: alias astro to @types/astro (#3503) 2022-06-02 12:54:35 -05:00
unused-slot.test.js Update rollup to prevent empty slot bug (#3496) 2022-06-01 12:21:32 -04:00
virtual-astro-file.js Allow defining Astro components in Vite plugins (#3889) 2022-07-11 16:13:21 -04:00
vue-component.test.js Upgrade Vite to 3.2 (#5212) 2022-10-28 22:03:07 +08:00
vue-jsx.test.js Support Vue JSX (#4897) 2022-09-29 11:25:45 +08:00
vue-with-multi-renderer.test.js Fix: Vue script setup with other renderers applied (#4706) 2022-09-09 19:09:59 -04:00