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

用webpack打包出错 #137

Closed
CrazyAlvaro opened this issue Jun 5, 2017 · 9 comments
Closed

用webpack打包出错 #137

CrazyAlvaro opened this issue Jun 5, 2017 · 9 comments

Comments

@CrazyAlvaro
Copy link

SyntaxError: Unexpected token name «i», expected punc «;» [./~/.2.8.3@pinyin/lib/pinyin.js:34,0]

已经在webpack中配置了babel-loader,但是似乎这段代码仍就没有被转换,可以帮忙看看吗?

@cmic1980
Copy link

cmic1980 commented Jun 6, 2017

遇到同样的错误,请问你解决了吗?

@CrazyAlvaro
Copy link
Author

@cmic1980 嗯,参照这个issue的解决方案,使用harmony版本,然后在webpack配置文件中使用。

@hotoo
Copy link
Owner

hotoo commented Jun 6, 2017

#129

@xiongmaozhanjiangshi2
Copy link

在webpack.base.conf修改一下js加载那边的配置改成这样的
{
test: /.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/.2.8.3@pinyin')]
},

@CrisLi
Copy link

CrisLi commented Sep 15, 2017

把uglifyjs-webpack-plugin升级到v1.0.0-beta.2就能解决。

@Dodo703
Copy link

Dodo703 commented Nov 25, 2017

image
image
image

打包没问题,可是运行有问题,解决了,http://blog.csdn.net/u013034736/article/details/70174425

@mmyxjx
Copy link

mmyxjx commented Dec 9, 2017

{
test: /.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/.2.8.3@pinyin')]
},
resolve 是path.resolve,搞半天没发现 ,大家可注意啦

@MemoSanMu
Copy link

@hotoo
Copy link
Owner

hotoo commented Mar 22, 2022

请使用 3.x npm i pinyin@alpha

@hotoo hotoo closed this as completed Mar 22, 2022
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

8 participants