Skip to content

Commit fa8e0c7

Browse files
comments, etc
1 parent ac5f160 commit fa8e0c7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

scripts/bundles/internal.ts

+4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ async function copyStencilInternalDts(opts: BuildOptions, outputInternalDir: str
7373
// We bundle with `dts-bundle-generator` here to ensure that when the `docs-json`
7474
// OT writes a `docs.d.ts` file based on this file it is fully portable.
7575
const docsDts = await bundleDts(opts, docsDtsSrcPath, {
76+
// we want to suppress the `dts-bundle-generator` banner here because we do
77+
// our own later on
7678
noBanner: true,
79+
// we also don't want the types which are inlined into our bundled file to
80+
// be re-exported, which will change the 'surface' of the module
7781
exportReferencedTypes: false,
7882
});
7983
await fs.writeFile(docsDtsDestPath, docsDts);

scripts/utils/bundle-dts.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { BuildOptions } from './options';
1212
*
1313
* @param opts an object holding information about the current build of Stencil
1414
* @param inputFile the path to the file which should be bundled
15-
* @param ouputOptions options for bundling the file
15+
* @param outputOptions options for bundling the file
1616
* @returns a string containing the bundled typedef
1717
*/
18-
export async function bundleDts(opts: BuildOptions, inputFile: string, ouputOptions?: OutputOptions): Promise<string> {
18+
export async function bundleDts(opts: BuildOptions, inputFile: string, outputOptions?: OutputOptions): Promise<string> {
1919
const cachedDtsOutput = inputFile + '-bundled.d.ts';
2020

2121
if (!opts.isProd) {
@@ -28,8 +28,8 @@ export async function bundleDts(opts: BuildOptions, inputFile: string, ouputOpti
2828
filePath: inputFile,
2929
};
3030

31-
if (ouputOptions) {
32-
config.output = ouputOptions;
31+
if (outputOptions) {
32+
config.output = outputOptions;
3333
}
3434

3535
const outputCode = cleanDts(generateDtsBundle([config]).join('\n'));

0 commit comments

Comments
 (0)