Use dist in specifier when importing internal stuff (#296)
* Use dist in specifier when importing internal stuff * Added the changeset
This commit is contained in:
parent
6f851fd779
commit
fe6a985d56
4 changed files with 9 additions and 3 deletions
5
.changeset/mighty-hats-wink.md
Normal file
5
.changeset/mighty-hats-wink.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes resolution when esinstall installs Markdown and Prism components
|
|
@ -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",
|
||||
|
|
|
@ -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';`,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue