Closed Ronsku closed 6 years ago
This might be related to the test code, as I compile the code for running in tests to ES6 (for coverage reasons). But at the same time, compiled code should not go to /dist/ any longer (maybe for the tests, but not for consumption/release).
All .js files should go into /src/. Did you import {}
directly from reactive-state/dist/*
? If so, try only to import like this: import { Store, Action, Reducer } from 'reactive-state'
or, when using the react-bridge: `import { connect } from 'reactive-state/react'
Another note: If you cloned reactive-state locally, try a git clean -xfd
and re-run npm install && npm run build
manually
In 0.5.3 there aren't anymore all the dist
files.
also in package.json
: "main": "src/index.js",
so when you just import import { Store, Action, Reducer } from 'reactive-state'
it will always go to the src/
.
Yes, everything goes into src/-folder and also the package.json-linking. All files in src/ are ES6. Could src/-folder files be in ES5 in NPM repository?
Uuuh my bad, the "npm run build-test" actually replaces the src/ files with ES6 versions, and I accidentally published those. Just publish v0.5.4 that fixes this. Will need to find another solution for the test compiltion.
I registered a prepublish hook that should prevent this happening in the future.
Amazing! Thank you once again! 👍 :)
Hi,
I upgraded reactive-state from 0.4.5 -> 0.5.3 (No idea what the version updates with 0.8.x in between are, but they are obviously not pushed to the NPM repository).
I've got issues now with the upgrade since code in
src
(olddist
) is in ES6. Before it was in ES5 as it should. tsconfig.json says target ES5 and that is perfect, but build is wrong currently in latest version.Screenshot from 0.5.3 (ES6):
Screenshot from 0.4.5 (ES5):
I would love to have it in ES5 format like before. Is this a mistake or a change made on purpose?
Thank you Timo!