inflected stopped working with upgrade to 1.0.
Created by: timscott
Is this a bug report?
Unsure
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
"inlfected" "camelize is not defined" "not defined"
Environment
-
node -v
: 8.5.0 -
npm -v
: 4.6.1 -
yarn --version
(if you use Yarn): 1.0.2 -
npm ls react-scripts
(if you haven’t ejected): react-scripts@1.0.13
Then, specify:
- Operating system: OSX
- Browser and version (if relevant):
Steps to Reproduce
- Create app with with v0.9.5
yarn add inflected
- Add code like:
import {camelize} from 'inflected';
const foo = camelize('foo_bar');
yarn start
- In browser cause code in step 3 to run.
- It works!
yarn upgrade react-scripts@1.0.13
- Repeat steps 4-5.
- See error:
Uncaught ReferenceError: camelize is not defined
- Change the code in step 3:
const camelize = require('inflected').camelize;
const foo = camelize('foo_bar');
- Repeat steps 3-4
- It works again!
Expected Behavior
No error.
Actual Behavior
Get error: Uncaught ReferenceError: camelize is not defined
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)