update externals

This commit is contained in:
Andrew Pareles 2024-11-10 16:26:01 -08:00
parent 01d99645a6
commit 752ebfff3b
6 changed files with 7 additions and 1236 deletions

View file

@ -0,0 +1 @@
out/

View file

@ -2,3 +2,5 @@
// build tailwind -> styles.css
// the structure of files here MUST be shallow so that external = ../../ works

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { mountFnGenerator } from '../util/mountFnGenerator'
import { VIEWPANE_FILTER_ACTION } from '../../../../../browser/parts/views/viewPane'
import { VIEWPANE_FILTER_ACTION } from '../../../../../browser/parts/views/viewPane.js'
import { ServicesAccessor } from '../../../../../../platform/instantiation/common/instantiation'
// import { SidebarThreadSelector } from './SidebarThreadSelector.js';
// import { SidebarChat } from './SidebarChat.js';

View file

@ -11,7 +11,8 @@ export default defineConfig({
platform: 'browser',
target: 'esnext',
outExtension: () => ({ js: '.js' }),
// external: [/\.\.\/\.\.\/.*/],
noExternal: ['react', 'react-dom'],
// default behavior is to take local files and make them internal (bundle them) and take imports like 'react' and leave them external (don't bundle them), we want the opposite in many ways
noExternal: ['react', 'react-dom'], // noExternal means we should take these things and make them not external (bundle them into the output file)
external: [/\.\.\/\.\.\/.*/], // these imports should be kept external ../../ are external (this is just an optimization so the output file doesn't re-implement functions)
treeshake: true,
})