Closed
Description
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.0npm -v
: 4.6.1yarn --version
(if you use Yarn): 1.0.2npm ls react-scripts
(if you haven’t ejected): [email protected]
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 [email protected]
- 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.)