Skip to content

Commit

Permalink
fix(expo-hqplan): removed the withNxMetro until it gets patched.
Browse files Browse the repository at this point in the history
  • Loading branch information
h0lybyte committed Feb 27, 2025
1 parent c0d9a46 commit 1664ee0
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 19 deletions.
8 changes: 7 additions & 1 deletion apps/experimental/expo-hqplan/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
//import { registerRootComponent } from 'expo';


import './src/global.css';

import { registerRootComponent } from 'expo';
import { ExpoRoot } from 'expo-router';

import 'expo-router/entry';

export function App() {
const ctx = require.context('./src/app');
return <ExpoRoot context={ctx} />;
}
}

registerRootComponent(App);
23 changes: 17 additions & 6 deletions apps/experimental/expo-hqplan/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { withNxMetro } = require('@nx/expo');
const { getDefaultConfig } = require('@expo/metro-config');
const { mergeConfig } = require('metro-config');
const { withNativeWind } = require('nativewind/metro');

<<<<<<< Updated upstream
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts, resolveRequest } = defaultConfig.resolver;

Expand All @@ -22,10 +22,21 @@ const customConfig = withNativeWind({
resolveRequest: resolveRequest ?? require('metro-resolver').resolve, // Preserve Metro's resolver if it exists
},
});
=======
// Default Metro configuration
const defaultConfig = getDefaultConfig(__dirname);

// Apply Nx modifications first
// const nxConfig = withNxMetro(defaultConfig, {
// debug: false,
// extensions: [],
// watchFolders: ['./src'],
// maxWorkers: 2,
// });
>>>>>>> Stashed changes

module.exports = withNxMetro(mergeConfig(defaultConfig, customConfig), {
debug: false,
extensions: [],
watchFolders: ['./src'],
maxWorkers: 2,
// Apply NativeWind Plugin last
module.exports = withNativeWind(defaultConfig, {
input: './src/global.css',
configPath: './tailwind.config.js',
});
8 changes: 8 additions & 0 deletions apps/experimental/expo-hqplan/src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ import Svg, { G, Path } from 'react-native-svg';
import { verifyInstallation } from 'nativewind';


import { verifyInstallation } from 'nativewind';



export const App = () => {

verifyInstallation();


const [whatsNextYCoord, setWhatsNextYCoord] = useState<number>(0);
const scrollViewRef = useRef<null | ScrollView>(null);
verifyInstallation();
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions apps/experimental/expo-hqplan/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
module.exports = {
darkMode: "class",
content: [
"./apps/experimental/expo-hqplan/**/*.{js,jsx,ts,tsx}",
"./src/app/**/*.{js,jsx,ts,tsx}"],
"./index.{js,jsx,ts,tsx}",
"./src/app/**/*.{js,jsx,ts,tsx}",
"./src/app/**/**/*.{js,jsx,ts,tsx}"],
presets: [require("nativewind/preset")],
plugins: [],
};
Original file line number Diff line number Diff line change
Expand Up @@ -29675,21 +29675,24 @@ function createSheet({
frameSize,
contentRef,
open
} = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = (0, import_react22.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StackZIndexContext, {
zIndex: resolveViewZIndex(props.zIndex),
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Frame2, {
} = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = (0, import_react22.useMemo)(() => (
// @ts-expect-error
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Frame2, {
ref: composedContentRef,
flex: hasFit ? 0 : 1,
height: hasFit ? void 0 : frameSize,
pointerEvents: open ? "auto" : "none",
...props,
children: [children, adjustPaddingForOffscreenContent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core8.Stack, {
children: [/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StackZIndexContext, {
zIndex: resolveViewZIndex(props.zIndex),
children
}), adjustPaddingForOffscreenContent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core8.Stack, {
"data-sheet-offscreen-pad": true,
height: offscreenSize,
width: "100%"
})]
})
}), [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
), [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
children: [/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RemoveScroll, {
forwardProps: true,
Expand Down
13 changes: 8 additions & 5 deletions apps/experimental/expo-lcagents/.tamagui/tamagui.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -31632,21 +31632,24 @@ function createSheet({
frameSize,
contentRef,
open
} = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = (0, import_react23.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StackZIndexContext, {
zIndex: resolveViewZIndex(props.zIndex),
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Frame2, {
} = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = (0, import_react23.useMemo)(() => (
// @ts-expect-error
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Frame2, {
ref: composedContentRef,
flex: hasFit ? 0 : 1,
height: hasFit ? void 0 : frameSize,
pointerEvents: open ? "auto" : "none",
...props,
children: [children, adjustPaddingForOffscreenContent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core9.Stack, {
children: [/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StackZIndexContext, {
zIndex: resolveViewZIndex(props.zIndex),
children
}), adjustPaddingForOffscreenContent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core9.Stack, {
"data-sheet-offscreen-pad": true,
height: offscreenSize,
width: "100%"
})]
})
}), [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
), [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
children: [/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RemoveScroll, {
forwardProps: true,
Expand Down

0 comments on commit 1664ee0

Please sign in to comment.