naver / egjs-axes

A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates.
https://naver.github.io/egjs-axes/
MIT License
178 stars 31 forks source link

module property in package.json makes error on build #4

Closed jongmoon closed 7 years ago

jongmoon commented 7 years ago

Description

When making build(eg. npm run build) project which depends on movablecoord 2.0.0-rc.1, There's error.

Unexpected token punc «(», expected punc «:» [yawpitch.min.js:1880,20]

npm ERR! Darwin 16.5.0
npm ERR! argv "/Users/jongmoon/.nvm/versions/node/v6.6.0/bin/node" "/Users/jongmoon/.nvm/versions/node/v6.6.0/bin/npm" "run" "build"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! @egjs/yawpitch@1.0.0-beta build: `webpack --env.mode production --config webpack.config.js && webpack --env.mode pkgd --config webpack.
config.js`
npm ERR! Exit status 2

If you change module property, It works!

NOT WORK!

"main": "dist/movablecoord.js",
"module": "src/MovableCoord.js",
"name": "@egjs/movablecoord",

WORK

"main": "dist/movablecoord.js",
"module": "dist/movablecoord.js",//changed!
"name": "@egjs/movablecoord",
sculove commented 7 years ago

That's right. Thanks ref http://2ality.com/2017/04/setting-up-multi-platform-packages.html?utm_source=nodeweekly&utm_medium=email