Skip to content

Commit 9b1b908

Browse files
committed
0.0.48
1 parent 51a445e commit 9b1b908

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@observablehq/cli",
33
"license": "UNLICENSED",
4-
"version": "0.0.47",
4+
"version": "0.0.48",
55
"type": "module",
66
"publishConfig": {
77
"registry": "https://npm.pkg.github.com"

src/rollup.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export async function rollupClient(clientPath: string, {minify = false} = {}): P
1515
const bundle = await rollup({
1616
input: clientPath,
1717
external: [/^https:/],
18-
plugins: [importResolve(clientPath), esbuild({target: "es2022", minify}), importMetaResolve()]
18+
plugins: [
19+
importResolve(clientPath),
20+
esbuild({target: "es2022", exclude: [], minify}), // don’t exclude node_modules
21+
importMetaResolve()
22+
]
1923
});
2024
try {
2125
const output = await bundle.generate({format: "es"});
@@ -37,7 +41,7 @@ async function resolveImport(source: string, specifier: string | AstNode): Promi
3741
return typeof specifier !== "string"
3842
? null
3943
: specifier.startsWith("observablehq:")
40-
? {id: relativeUrl(source, `./src/client/${specifier.slice("observablehq:".length)}.js`), external: true}
44+
? {id: relativeUrl(source, getClientPath(`./src/client/${specifier.slice("observablehq:".length)}.js`)), external: true} // prettier-ignore
4145
: specifier.startsWith("npm:")
4246
? {id: await resolveNpmImport(specifier.slice("npm:".length))}
4347
: null;

0 commit comments

Comments
 (0)