fuzzyjs icon indicating copy to clipboard operation
fuzzyjs copied to clipboard

Publish package with rn / lower targets

Open tonyxiao opened this issue 2 years ago • 1 comments

Trying to use this with expo react native and it fails out of the box. Optional chaining is not supported yet.

./node_modules/fuzzyjs/build/esm/index.js 92:27
Module parse failed: Unexpected token (92:27)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function match(query, source, opts = { withScore: true }) {
|   const [reshapedQuery, reshapedSource] = reshapeInput(query, source, opts);
>   const withScore = !(opts?.withScore === false);
|   if (reshapedSource.length === 0 || reshapedQuery.length === 0) {
|     return {

tonyxiao avatar Jun 24 '22 06:06 tonyxiao

Hello! Optional chaining is supported as of Node.JS 14 which is LTS (MDN). Why would I lower the target?

gjuchault avatar Jun 25 '22 11:06 gjuchault