@barefootjs/vite 0.33.2 → 0.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/discover.d.ts +78 -6
- package/dist/discover.d.ts.map +1 -1
- package/dist/index.js +835 -394
- package/package.json +6 -6
- package/src/__tests__/discover.test.ts +140 -12
- package/src/__tests__/e2e-vite-build.test.ts +45 -1
- package/src/__tests__/e2e-vite-dev.test.ts +20 -0
- package/src/__tests__/plugin.test.ts +29 -4
- package/src/discover.ts +159 -27
- package/src/plugin.ts +2 -2
package/src/plugin.ts
CHANGED
|
@@ -395,7 +395,7 @@ export function barefoot(options: BarefootViteOptions): Plugin {
|
|
|
395
395
|
reportErrors(canonical, content, projectDir)
|
|
396
396
|
|
|
397
397
|
let result = canonical
|
|
398
|
-
if (component.
|
|
398
|
+
if (component.needsClientEntry) {
|
|
399
399
|
const { scriptAssets, preloadAssets } = resolveAssetsFor(component)
|
|
400
400
|
if (scriptAssets.length > 0) {
|
|
401
401
|
result = compileJSX(content, component.absPath, {
|
|
@@ -559,7 +559,7 @@ export function barefoot(options: BarefootViteOptions): Plugin {
|
|
|
559
559
|
|
|
560
560
|
const input: Record<string, string> = {}
|
|
561
561
|
for (const c of found) {
|
|
562
|
-
if (!c.
|
|
562
|
+
if (!c.needsClientEntry) continue
|
|
563
563
|
// The object KEY only names the output chunk (Rollup's `[name]`) —
|
|
564
564
|
// it must be safe even for a `components` dir outside `root` (see
|
|
565
565
|
// `safeRollupEntryName`). It is NOT the manifest lookup key
|