You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.
Can't figure out how to install npm deps in JSBin sorry ¯\_(ツ)_/¯
What is the expected behavior?
It would be ✨ Awesome ✨ to be able to import redux in the browser
Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
AFAICT this affects all versions and all browsers.
If this suggestion seems reasonable to the maintainers, I'm happy to issue a pull request adding the file extensions and relative paths to import statements in /src/**/*.js
The text was updated successfully, but these errors were encountered:
It's a side effect of the layout from an npm install.
For now, because the browser module story is still settling, I don't think this is a thing we should necessarily handle ourselves. Services like unpkg are providing rewritten modules to support this kind of thing right now. I'm sure we're getting close to an express middleware that will do the same thing.
Also, based on how things will be changing with #2358, this kind of thing will be a non-issue in the near future too.
What is the current behavior?
index.js imports dependencies without file extensions:
If a user were to
import * as Redux from '../node_modules/redux/src/index.js
, the browser would not be able to resolvecreateStore
et al. as files.A potential hitch is the lodash dependency in https://github.com/reactjs/redux/blob/53f3e1594b0754a7afcc416ec668e2b7f22573bf/src/combineReducers.js#L2 and https://github.com/reactjs/redux/blob/53f3e1594b0754a7afcc416ec668e2b7f22573bf/src/createStore.js#L1 which could likely be hitched by using a relative path like
../lodash/isPlainObject.js
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.
Can't figure out how to install npm deps in JSBin sorry ¯\_(ツ)_/¯
What is the expected behavior?
It would be ✨ Awesome ✨ to be able to import redux in the browser
👆 and it just works.
Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
AFAICT this affects all versions and all browsers.
If this suggestion seems reasonable to the maintainers, I'm happy to issue a pull request adding the file extensions and relative paths to import statements in
/src/**/*.js
The text was updated successfully, but these errors were encountered: