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

npm方式下载的包,只引出了Parser方法。 #42

Open
xylin123 opened this issue Jan 15, 2018 · 2 comments
Open

npm方式下载的包,只引出了Parser方法。 #42

xylin123 opened this issue Jan 15, 2018 · 2 comments

Comments

@xylin123
Copy link

xylin123 commented Jan 15, 2018

我在想前端工程里使用您的项目,但是发现我用npm下的包 只引出了Parser方法。
如果我想用这个项目的话, 只能通过script的方式使用吗?

补充:
刚刚我看了一下,发现src/server/index里的确只有暴露出了Parserversion这两个不知道方不方便做一下修改?

@Houfeng
Copy link
Owner

Houfeng commented Jan 17, 2018

稍后,我做一下处理

@xylin123
Copy link
Author

你好,我目前在我的项目中是这么引用的

import Mditor from 'mditor/src/client/index';

还需要在wepack配置中加入一个 raw-loader

          ...
         {
            test: /mditor\/src\/.*\/.*.html$/,
            loader: 'raw-loader'
          },
          ...

不知道有没有更官方的解决方式。

PS: 这么引 我的项目打包速度 明显慢了很多...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants