oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
179 stars 24 forks source link

Parse failure with webpack 4.x / create-react-app #257

Closed walkah closed 3 years ago

walkah commented 3 years ago

Summary

Problem

Adding webnative to a create-react-app built app results in a parse error:

./node_modules/webnative/lib/fs/v1/PublicTree.js 157:49
Module parse failed: Unexpected token (157:49)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|       return { ...acc,
|         [cur.name]: { ...cur,
>           isFile: this.header.skeleton[cur.name]?.isFile
|         }
|       };

Impact

It's too hard to get webpack integrated with a simple react app.

Versions

walkah commented 3 years ago

This is specific to webnative v0.26- works fine in v0.25.2

matheus23 commented 3 years ago

When I ran the blog repo against the PR, it fixed the issue, if I remember correctly. Let me whether if fixed it for you, too :)