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

在引入[email protected],打包后报错 #10

Open
hjx5309 opened this issue Nov 6, 2018 · 8 comments
Open

在引入[email protected],打包后报错 #10

hjx5309 opened this issue Nov 6, 2018 · 8 comments
Assignees

Comments

@hjx5309
Copy link

hjx5309 commented Nov 6, 2018

我的代码
var vie = new ChimeePlayer({
wrapper: '#wrapper',
// src:"http://cdn.toxicjohann.com/lostStar.mp4",
controls: true,
autoplay: false,
// plugin: [popup.name],
autoload: false
})
打包后,日志报错
Uncaught SyntaxError: Unexpected token ] chimee-player.browser.js:27620

var getCharForByte = function getCharForByte(byte) {
var charCode = byte;
if (specialCea608CharsCodes.hasOwnProperty(byte)) charCode = specialCea608CharsCodes[byte];

  return String.fromCharCode(charCode);
};
@hjx5309
Copy link
Author

hjx5309 commented Nov 6, 2018

后来发现是 这行代码charCode = specialCea608CharsCodes[byte.toString()];
就好了

@hjx5309
Copy link
Author

hjx5309 commented Nov 6, 2018

因为byte是数字

@toxic-johann
Copy link
Member

@yandeqiang 目测是某个 kernel 中的问题。。但现在该项目中的依赖都依赖于 github。
故我先会将相关依赖迁回 npm。你再行修改吧。

@toxic-johann
Copy link
Member

尝试修复在 npm-dependency 分支,但是不成功

@yandeqiang
Copy link
Contributor

更新了一下。 我是会报另一个错误。 popup 的依赖问题。

@toxic-johann
Copy link
Member

@yandeqiang 需要我配合处理么

@toxic-johann
Copy link
Member

@yandeqiang 我这边看这个新的更新分支已经没有问题了耶

@toxic-johann
Copy link
Member

@hjx5309 看了看这段代码。感觉和数字的关系不大。能不能提供一个全一点的复现 demo

@toxic-johann toxic-johann removed the bug label Nov 12, 2018
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

3 participants