Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with minified version of react-dom #99

Open
zabojad opened this issue May 8, 2017 · 3 comments
Open

Does not work with minified version of react-dom #99

zabojad opened this issue May 8, 2017 · 3 comments

Comments

@zabojad
Copy link

zabojad commented May 8, 2017

The onTouchTap callbacks do not get raised anymore when we pack our react js app with the minified version of react-dom: react-dom.min.js.

Everything else seems to work fine to is it rather a react-tap-event-plugin bug or a react-dom bug ?

@JedrzejMajko
Copy link

JedrzejMajko commented May 12, 2017

Very easy to reproduce:
package.json:
{ "name": "web", "version": "0.0.1", "private": true, "description": "Web ", "keywords": [], "author": "", "license": "", "main": "app.js", "dependencies": { "material-ui": "^0.18.0", "next": "^2.3.1", "react": "^15.5.4", "react-tap-event-plugin": "^2.0.1", "react-dom": "^15.5.4" }, "devDependencies": {}, "scripts": { "dev": "next", "build": "next build", "start": "next start" } }
then in command line:
mkdir pages; npm install

Create index.js in pages with this line:
import injectTapEventPlugin from 'react-tap-event-plugin';

result of npm run build:
`

Failed to build on /var/folders/dw/qrjcn17d09532ndl_phmd4800000gn/T/d42a856c-b5fe-45be-ab4f-33da2590c40a
{ Error: ./~/react-tap-event-plugin/src/injectTapEventPlugin.js
Module not found: Error: Can't resolve 'react-dom/lib/EventPluginHub' in '/ProjectBase/node_modules/react-tap-event-plugin/src'
resolve 'react-dom/lib/EventPluginHub' in '/ProjectBase/node_modules/react-tap-event-plugin/src'
Parsed request is a module
using description file: /ProjectBase/node_modules/react-tap-event-plugin/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
aliased with mapping 'react-dom': '/ProjectBase/node_modules/react-dom/dist/react-dom.min.js' to '/ProjectBase/node_modules/react-dom/dist/react-dom.min.js/lib/EventPluginHub'
using description file: /ProjectBase/node_modules/react-tap-event-plugin/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /ProjectBase/node_modules/react-tap-event-plugin/package.json (relative path: ./src)
using description file: /ProjectBase/node_modules/react-dom/package.json (relative path: ./dist/react-dom.min.js/lib/EventPluginHub)
as directory
/ProjectBase/node_modules/react-dom/dist/react-dom.min.js/lib/EventPluginHub doesn't exist
no extension
Field 'browser' doesn't contain a valid alias configuration
/ProjectBase/node_modules/react-dom/dist/react-dom.min.js/lib/EventPluginHub doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/ProjectBase/node_modules/react-dom/dist/react-dom.min.js/lib/EventPluginHub.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/ProjectBase/node_modules/react-dom/dist/react-dom.min.js/lib/EventPluginHub.json doesn't exist`

@mikearnaldi
Copy link

Downgrading to [email protected] solves the issue apparently something is not going well with next

@mikearnaldi
Copy link

Related discussion in next.js repo vercel/next.js#1877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants