File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ export interface DeclarationInfo {
2222export interface BinderOptions {
2323 staticHelpers ?: Map < string , StaticHelperMetadata > ;
2424 dependencies ?: Record < string , ReferenceableSymbol > ;
25- /** When true, use #platform/ subpath imports for static helpers with platform variants.
26- * Should be true for warp packages; false for tshy packages. */
27- useSubpathImports ?: boolean ;
2825}
2926
3027export interface Binder {
Original file line number Diff line number Diff line change @@ -502,8 +502,7 @@ export async function $onEmit(context: EmitContext) {
502502 } ) ,
503503 } ;
504504
505- // Always update package.json (adds #platform/* imports) along with
506- // exports, clientContextPaths and LRO deps.
505+ // Always update package.json exports, clientContextPaths and LRO deps.
507506 {
508507 // Read package.json content via host and pass parsed object
509508 const pkgSourceFile = await host . readFile ( existingPackageFilePath ) ;
Original file line number Diff line number Diff line change @@ -99,30 +99,6 @@ export function updatePackageFile(
9999 needsCoreClientUpdate = true ;
100100 }
101101
102- // Ensure warp packages have #platform/* imports for polyfill resolution.
103- // The `react-native` condition is only added when explicitly opted in via
104- // `generateReactNativeTarget`, matching the fresh-generation path in
105- // `getEsmEntrypointInformation` (packageCommon.ts).
106- const platformImports : Record < string , string > = {
107- browser : "./src/*-browser.mts" ,
108- default : "./src/*.ts" ,
109- } ;
110- if ( model . options ?. generateReactNativeTarget ) {
111- // Insert `react-native` before `default` so Node's conditional
112- // resolution order matches the fresh-generation output.
113- packageInfo . imports = {
114- "#platform/*" : {
115- browser : platformImports [ "browser" ] ,
116- "react-native" : "./src/*-react-native.mts" ,
117- default : platformImports [ "default" ] ,
118- } ,
119- } ;
120- } else {
121- packageInfo . imports = {
122- "#platform/*" : platformImports ,
123- } ;
124- }
125-
126102 // Update exports (warp: resolved exports in package.json)
127103 if ( needsExportsUpdate ) {
128104 packageInfo . exports = resolveWarpExports ( exports , model . options ?. generateReactNativeTarget ) ;
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ targets:
6161 * Builds a self-contained warp.config.yml file.
6262 *
6363 * Emits a full inline config with all exports and targets.
64- * Polyfill resolution (browser/react-native file substitution) is handled
65- * via package.json `imports` subpath imports (#platform/*).
6664 *
6765 * By default, react-native target is NOT included. Set `generateReactNativeTarget: true`
6866 * in options to include it.
You can’t perform that action at this time.
0 commit comments