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打包报错 #53

Open
ZeeLyn opened this issue Nov 23, 2022 · 2 comments
Open

webpack打包报错 #53

ZeeLyn opened this issue Nov 23, 2022 · 2 comments

Comments

@ZeeLyn
Copy link

ZeeLyn commented Nov 23, 2022

`These dependencies were not found:

  • env in ./node_modules/fonteditor-core/woff2/woff2.wasm
  • global in ./node_modules/fonteditor-core/woff2/woff2.wasm`

webpack打包报错

@kekee000
Copy link
Owner

kekee000 commented Jan 6, 2023

在 webpack 上打包时,需要自己拷贝 woff2.wasm,然后 初始化时传入 下载地址:

woff2.init(wasmUrl).then(() => {
  // read
  let font = Font.create(buffer, {
    type: 'woff2'
  });
  // write
  font.write({type: 'woff2'});
});

@ZeeLyn
Copy link
Author

ZeeLyn commented Apr 21, 2023

是在编译的时候就报错,能否给一个示例

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