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

引入vant如何按需加载 #17

Open
superlbr opened this issue Jul 18, 2020 · 4 comments
Open

引入vant如何按需加载 #17

superlbr opened this issue Jul 18, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@superlbr
Copy link

${root}/webpack.config.js 引入ts-import-plugin无效

hubcarl pushed a commit that referenced this issue Jul 21, 2020
@hubcarl
Copy link
Collaborator

hubcarl commented Jul 21, 2020

@superlbr see awesome branch demo

@hubcarl hubcarl added the help wanted Extra attention is needed label Jul 21, 2020
@superlbr
Copy link
Author

superlbr commented Jul 21, 2020

@hubcarl thanks, done with warning

2020-07-21 15:57:25,127 ERROR 27566 [mobile/activity.js] server render bundle error, try client render, the server render error test/node_modules/vant/es/button/index.js:1
import _extends from "@babel/runtime/helpers/esm/extends";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1117:16)

well, import directly with no warning

import RadioGroup from 'vant/lib/radio-group';
// import 'vant/lib/form/style' style not work
import 'vant/lib/index.css'

@hubcarl
Copy link
Collaborator

hubcarl commented Jul 22, 2020

@superlbr 上面例子可以运行不?仔细对一下配置修改

@superlbr
Copy link
Author

@hubcarl 可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants