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

how to use dynamic Import using relative path #4018

Closed
1 task
Cuihongsen opened this issue Mar 16, 2018 · 1 comment
Closed
1 task

how to use dynamic Import using relative path #4018

Cuihongsen opened this issue Mar 16, 2018 · 1 comment

Comments

@Cuihongsen
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

require relative path

Current Behavior

require real path

Steps to Reproduce (for bugs)

  1. import dynamic from 'next/dynamic';
  2. const DynamicToast = dynamic(import('../Toast/Model'))
  3. render
  4. next build
  5. I find this code in the build file
require("/Users/cui/code/bgt-next/.next/dist/"+({0:"chunks/components_Head_CommonDataGet_862fa71fb71bf2f9a1510bd6db4c2d86",1:"chunks/components_Toast_Model_85c00f4ecc802eef46047a5e1de0328e"}[t]||t)+"-"+{0:"f0f24e5569d7ef5be482",1:"4889637e50f9c8f8c305"}[t]+".js"),

Context

Your Environment

Tech Version
next latest
node 8.10.1
OS mac os 10.13.3
browser
etc
@Cuihongsen
Copy link
Author

I update the version to 5.0.1-canary.15.
it works

@lock lock bot locked as resolved and limited conversation to collaborators Mar 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant