redux-undo: Build error related to babel
v0.6.0
error: bundling failed: "TransformError: [app_folder]/node_modules/redux-undo/lib/index.js: [BABEL] [app_folder]/node_modules/redux-undo/lib/index.js: Using removed Babel 5 option: [app_folder]/node_modules/redux-undo/.babelrc.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
v0.6.1
error: bundling failed: "TransformError: [app_folder]/node_modules/redux-undo/lib/index.js: Couldn't find preset \"es2015\" relative to directory \"[app_folder]/node_modules/redux-undo\""
v1.0.0-beta9-9-6
error: bundling failed: "TransformError: [app]/node_modules/redux-undo/lib/index.js: Unknown plugin \"add-module-exports\" specified in \"[app]/node_modules/redux-undo/.babelrc\" at 0, attempted to resolve relative to \"[app]/node_modules/redux-undo\""
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 22 (4 by maintainers)
I have such version in package.json:
"redux-undo": "1.0.0-beta9-9-7"And it’s giving me same error:
Am I missed something?
released
beta9-9-7with a fix for thisSo I fixed this by manually removing the node_modules/redux-undo/.babelrc file. When
redux-undogets distributed, it is already transformed so you don’t need the.babelrc. This is indeed an issue with the library.I also got this to work by modifying the
.babelrcand adding the following field:"ignore": ["lib/"]sincelib/is already transformed. I’ll create a PR for @omnidan to review–not sure if this ornpmignore-ing.babelrcis the preferred approachEDIT: actually, I think I’ll go with
"only": ["src/"]since that is more explicit withsrc/being the only place where es6 code lives for now