react-redux-typescript-jspm-starter
react-redux-typescript-jspm-starter copied to clipboard
Updating to [email protected]
I had to update the package on my fork because [email protected] reloading did not trigger parent dependency updates for plugin-text (i.e. module that imports text file does not update when text file is updated). Updating to v1.1.0 seems to fix this issue.
Here's a PR in case you were planning to update these dependencies.
Updating to systemjs-hot-reloader@ 1.1.0 requires updating jspm/systemjs.
New breaking changes in SystemJS@ 0.20.x due to NodeJS ES Module directions http://guybedford.com/systemjs-alignment.
-
That is, import { name } from 'cjs.js', where cjs.js is a CommonJS module will no longer be supported, and instead will require import cjs from 'cjs.js'; cjs.name. `
-
Now cjs modules need to be compiled with
__esModules
in order forimport { name } from 'cjs.js'
- This requires https://github.com/piotrwitek/react-redux-typescript/pull/2 to be updated to generate
exports.__esModules = true
. Tried using systemjs configuration via esModule option but it doesn't seem to be working: https://github.com/systemjs/builder/issues/775
- This requires https://github.com/piotrwitek/react-redux-typescript/pull/2 to be updated to generate
-
Unit testing seemed to have broke with
ReferenceError: System is not defined at Object.<anonymous> (src/store/currency-rates/spec/currency-rates-reducer.spec.tsx:1:119)
- For some reason adding
moduleNameMapper
seemed to allow Jest to resolve this
- For some reason adding
Also, side note, Jest doesn't seem to support JSPM/Systemjs correctly : http://stackoverflow.com/questions/32945193/jest-testing-with-es6-jspm-systemjs-reactjs
Hello, Thanks for PR, there is existing issue for this: #39 I will try to test it if working.
~What I don't like with this PR is the change of React import.
The syntax you are introducing is not compliant with the standard ES Modules.
It is because from consumer perspective I want to import React as namespace, and the correct syntax to import namespace is import * as React
.~
there is a bigger issue going on regarding commonjs modules: https://github.com/systemjs/systemjs/issues/1587
@wongwill86 thanks for contribution As already stated here: #39, I gonna wait with 0.20 upgrade until this issue is resolved: https://github.com/systemjs/systemjs/issues/1587
For me it seems 0.20 update introduce too much issues for existing users of boilerplate that it is not worth currently.
Thanks for help
no problem i hope it helps. That makes sense. thanks for reviewing!