I'm not sure how to properly build/test the project locally, I ran yarn test:jest and it worked, but running yarn build:demo would output an unexpected error about parcel and a duplicate plugin
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
Duplicates detected are:
[
{
"alias": "/foobar/react-popper/node_modules/@babel/plugin-proposal-class-properties/lib/index.js",
"dirname": "/foobar/react-popper",
"ownPass": false,
"file": {
"request": "@babel/proposal-class-properties",
"resolved": "/foobar/react-popper/node_modules/@babel/plugin-proposal-class-properties/lib/index.js"
}
},
{
"alias": "base$3",
"options": {
"loose": "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"
},
"dirname": "/foobar/react-popper",
"ownPass": false
}
]
nonetheless, the change should be straigth-forward,
it's about removing a polyfill https://www.npmjs.com/package/@hypnosphi/create-react-context that is creating problems in modern project due to it not compiling/defining esmmodule in package.json, this can usually be fixed via Aliases in project, but code-sandbox has no solution to this problem, as a result when trying to use react-popper 1.3.11 in a code-sandbox we get an error
I'm going to test this out in the project I'm working on and see if everything works as expected, if someone can provide some additional instroction on how I can make it work with flow/parcel and test it out as intended, it would be really appreciated!
N.B. I bumped the version to 1.4 because removing the polyfill could be potentially breaking for some project that are using react < 16 and depending on it...
I'm not sure how to properly build/test the project locally, I ran
yarn test:jest
and it worked, but runningyarn build:demo
would output an unexpected error about parcel and a duplicate pluginnonetheless, the change should be straigth-forward, it's about removing a polyfill![image](https://user-images.githubusercontent.com/59743524/149829308-cc04eb7c-7a8c-467a-a8a8-cda995b5b9ca.png)
https://www.npmjs.com/package/@hypnosphi/create-react-context
that is creating problems in modern project due to it not compiling/definingesm
module
inpackage.json
, this can usually be fixed via Aliases in project, but code-sandbox has no solution to this problem, as a result when trying to use react-popper 1.3.11 in a code-sandbox we get an errorI'm going to test this out in the project I'm working on and see if everything works as expected, if someone can provide some additional instroction on how I can make it work with flow/parcel and test it out as intended, it would be really appreciated!
N.B. I bumped the version to 1.4 because removing the polyfill could be potentially breaking for some project that are using react < 16 and depending on it...