Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with svg files question #1654

Closed
LuLuSaBee opened this issue Oct 12, 2021 · 7 comments
Closed

Using with svg files question #1654

LuLuSaBee opened this issue Oct 12, 2021 · 7 comments
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario

Comments

@LuLuSaBee
Copy link

Hi, I'm ready to use this in my project, but I have a question about this.

If use babel-plugin-inline-import, can svg be normal when build ?

@LuLuSaBee LuLuSaBee changed the title Use with svg files question Using with svg files question Oct 12, 2021
@Rynxiao
Copy link

Rynxiao commented Oct 22, 2021

I encounter an issue when using the babel-plugin-line-import.

Path '/proj/assets/icons/edit.svg' could not be found for '/Users/xxh/Documents/proj/src/components/Icon.tsx'

RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
-[NSRunLoop(NSRunLoop) runMode:beforeDate:]
-[NSRunLoop(NSRunLoop) runUntilDate:]
+[RNSplashScreen show]
-[AppDelegate application:didFinishLaunchingWithOptions:]
-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]
-[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:]
-[UIApplication _runWithMainScene:transitionContext:completion:]
-[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:]
_UIScenePerformActionsWithLifecycleActionMask
__101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke
-[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]
-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
-[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]
__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:]
_UISceneSettingsDiffActionPerformChangesWithTransitionContext
-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.573
-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]
-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:]
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]
-[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:]
__94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.180
-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
__94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke
_dispatch_client_callout
_dispatch_block_invoke_direct
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
-[FBSSerialQueue _targetQueue_performNextIfPossible]
-[FBSSerialQueue _performNextFromRunLoopSource]
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
__CFRunLoopDoSource0
__CFRunLoopDoSources0
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_sim
0x0

@LuLuSaBee
Copy link
Author

@Rynxiao Check your import path or name in Icon.tsx

@Rynxiao
Copy link

Rynxiao commented Oct 25, 2021

@Rynxiao Check your import path or name in Icon.tsx

Have you solved your problem?

I double-checked my import path but still report this error.

@LuLuSaBee
Copy link
Author

My question is that I wanna know is babel solution can be normal when building iOS app(ipa) or android app(apk).

@LuLuSaBee
Copy link
Author

@Rynxiao Are you already setting this in .babelrc ?

@Rynxiao
Copy link

Rynxiao commented Oct 26, 2021

@LuLuSaBee Yes, I follow the guide and add the setting to the babel config file.

@bohdanprog
Copy link
Member

Hello @LuLuSaBee,
If you still have a problem with it please share with us the simple repro of what you want to achieve.
Thank you

@bohdanprog bohdanprog added Missing repro This issue need minimum repro scenario Close when stale This issue is going to be closed when there is no activity for a while labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

3 participants