Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Compatibility Question #515

Closed
jeremy-ww opened this issue Jan 1, 2019 · 4 comments
Closed

Compatibility Question #515

jeremy-ww opened this issue Jan 1, 2019 · 4 comments

Comments

@jeremy-ww
Copy link
Contributor

Hi, I have some question about Poi's compatibility, it does not work well with Android 4.4.4 while using poi --serve.

Seem like there's something wrong with the below. Could u please fix them?

  1. formatWebpackMessages

(chalk is not ES5 compat)
https://github.com/egoist/poi/blob/master/core/dev-utils/formatWebpackMessages.js#L11

https://github.com/egoist/poi/blob/master/core/dev-utils/formatWebpackMessages.js#L75

https://github.com/egoist/poi/blob/master/core/dev-utils/formatWebpackMessages.js#L77

  1. hotDevClient

strip-ansi@4.0.0 is not ES5 compat, webpack-dev-server already fix it.

https://github.com/egoist/poi/blob/master/core/dev-utils/hotDevClient.js#L14

@egoist
Copy link
Owner

egoist commented Jan 1, 2019

PR welcome, maybe we can try to bundle hotDevClient using Rollup 🤔

@jeremy-ww
Copy link
Contributor Author

I did not see any build script in Poi's sub-repo 😅, It's better for you to revise it.

@egoist
Copy link
Owner

egoist commented Jan 1, 2019

You can use this option for now https://poi.js.org/config.html#babel-transpilemodules I suppose

@jeremy-ww
Copy link
Contributor Author

Like this? Failed because of ansi-styles using native Map, and it's doesn't take my Map polyfill. should polyfill be set in my entry option?

poi.config.js

module.exports = {
  babel: {
    transpileModules: ['@poi/dev-utils', 'chalk', 'escape-string-regexp', 'ansi-styles', 'supports-color']
  }
}

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

No branches or pull requests

2 participants