So I forked a package in the git. Made my changes. Then in my terminal
npm install --save git+https://github.com/hayk94/ddp.js.git
And then I try to import the package in my code as this
import DDP from 'ddp.js'
But webpack gives me this error
ERROR in ./main.js
Module not found: Error: Can't resolve 'ddp.js' in '/Users/hayksafaryan/projects/b2cEmbedLib'
@ ./main.js 23:11-28
@ multi (webpack)-dev-server/client?http://localhost:8080 babel-polyfill ./main.js
webpack: Failed to compile.
However webpack works fine if I install the package from npm.
I import the package as in the docs, however maybe there is some other way for git installed packages?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…