diff options
author | 2021-06-04 16:53:31 -0400 | |
---|---|---|
committer | 2021-06-04 16:53:31 -0400 | |
commit | fe6a985d560fd33ce3698a7621a9e9958eb438de (patch) | |
tree | 9bde4a165d023cf53c2c3653edbc44d96f6feb56 | |
parent | 6f851fd7799c81fa11f5c8ca52b7e801db22fbd1 (diff) | |
download | astro-fe6a985d560fd33ce3698a7621a9e9958eb438de.tar.gz astro-fe6a985d560fd33ce3698a7621a9e9958eb438de.tar.zst astro-fe6a985d560fd33ce3698a7621a9e9958eb438de.zip |
Use dist in specifier when importing internal stuff (#296)
* Use dist in specifier when importing internal stuff
* Added the changeset
-rw-r--r-- | .changeset/mighty-hats-wink.md | 5 | ||||
-rw-r--r-- | packages/astro/package.json | 3 | ||||
-rw-r--r-- | packages/astro/src/compiler/codegen/index.ts | 2 | ||||
-rw-r--r-- | packages/astro/src/compiler/index.ts | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/.changeset/mighty-hats-wink.md b/.changeset/mighty-hats-wink.md new file mode 100644 index 000000000..48d372ed1 --- /dev/null +++ b/.changeset/mighty-hats-wink.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes resolution when esinstall installs Markdown and Prism components diff --git a/packages/astro/package.json b/packages/astro/package.json index 4afe06def..beb757f01 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -12,7 +12,8 @@ "./components": "./components/index.js", "./components/*": "./components/*", "./runtime/svelte": "./dist/frontend/runtime/svelte.js", - "./internal/*": "./dist/internal/*" + "./internal/*": "./dist/internal/*", + "./dist/internal/*": "./dist/internal/*" }, "imports": { "#astro/compiler": "./dist/compiler/index.js", diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index 41044ffe7..bb3702526 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -165,7 +165,7 @@ function getComponentWrapper(_name: string, { url, importSpecifier }: ComponentI const importInfo = kind ? { componentUrl: getComponentUrl(), componentExport: getComponentExport() } : {}; return { wrapper: `__astro_component(${name}, ${JSON.stringify({ hydrate: kind, displayName: _name, ...importInfo })})`, - wrapperImport: `import {__astro_component} from 'astro/internal/__astro_component.js';`, + wrapperImport: `import {__astro_component} from 'astro/dist/internal/__astro_component.js';`, }; } diff --git a/packages/astro/src/compiler/index.ts b/packages/astro/src/compiler/index.ts index 1ef4079c5..b206878e0 100644 --- a/packages/astro/src/compiler/index.ts +++ b/packages/astro/src/compiler/index.ts @@ -114,7 +114,7 @@ import fetch from 'node-fetch'; ${result.imports.join('\n')} // \`__render()\`: Render the contents of the Astro module. -import { h, Fragment } from 'astro/internal/h.js'; +import { h, Fragment } from 'astro/dist/internal/h.js'; const __astroRequestSymbol = Symbol('astro.request'); async function __render(props, ...children) { const Astro = { |