Closed Gregoirevda closed 6 years ago
Our webpack config is based off of react-script's, and we're not likely to deviate from that.
Is there a reason you need all 3 entry points?
The 3 entry points are defined in the package.json of a dependency. Can you confirm me it'll pick the jsnext:main as the entry point?
I’m not really sure about the resolution between the three. I recommend playing around with CRA main if you’re unsure. We use the same dependency resultion and webpack config, except we add bs-loader.
@Gregoirevda @rrdelaney I believe it is similar issue related to this, I changed resolve extension order in webpack.config.dev.js
from:
extensions: ['.re', '.ml', '.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
to
extensions: ['.re', '.ml', '.web.js', '.js', '.mjs', '.json', '.web.jsx', '.jsx'],
then it compiled with reason-apollo
.
Currently reason-scripts
is using "webpack": "3.8.1",
, I think it does not probably support EcmaScript modules yet.
@rrdelaney is it straight forward to upgrade webpack to v4 to sync with current react-scripts
dependencies in this case?
Tried making a new project pointing on fixed react-scripts 1.1.2, but still have this issue. Is this project using the latest webpack release? https://github.com/graphql/graphql-js/issues/1248#issuecomment-382539073
reason-scripts isn't going to be updated, or really support much anymore. I recommend using Parcel with BSB.
Closing this because this won't be updated.
@rrdelaney You should add a warning about this in the main README and mark this package as deprecated in the meantime if it not going to get more updates. I don't think it's clear to a lot of people at the moment that this package is abandoned.
In addition to that I've never managed to make Parcel work on a my ReasonReact codebase, there's always some dependency or compilation error, have you had more success on your end?
@Anahkiasen shoot yea, forgot to do that when I moved it out of reasonml-old
We use a npm package as a dependency which has 3 entry points: https://github.com/apollographql/graphql-tag/blob/master/package.json#L5
main
,module
andjsnext:main
for some reason, it is using the ES6 module or jsnext:main entry point, which uses a undefinedrequire
import statement.Related issue: https://github.com/apollographql/reason-apollo/issues/95