-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error: Cannot find module '../../modules/core.regexp.escape' #2
Comments
Hi Dan, import Primo from './primo-explore-dom/js/primo'
//make Primo public
window.Primo = Primo; That is what we do in our CENTRAL_PACKAGE Let me know if you still have questions. Mehmet |
Thanks, Mehmet, I can confirm that that works. But I would much prefer to keep dependencies out of my source code. Wouldn't it work if you added the rest of the .js files to the npm package, not just Also, I'm still interested in how you generate |
Sorry, for not being able to get back sooner. It is not a real dependency or should I say it is not a real module it is a primo-explore package. It was done this way because in the normal mode of the development environment all the files get bluntly concatenated into 1 file -> the custom.js file. In the "browserify" mode it is a different story we have packagers, loaders etc. So, in a moment of weakness I worked around it by symlinking to the directory. But you are absolutely right this is not the way. I'll first need to think on how to fix this. Should it still be a library running in it's own context or should you be able to load the artifacts you need in your code.
Both have their advantages and disadvantages I guess. Thanks |
No prob! My only other dependency so far is lodash, which allows me to do
which is great since it means I don't have to include the whole library. In the same way, I think it would be great if you could import single components from this library, like you suggest:
Btw. what is the @ sign doing? Unfortunately I'm not familiar enough with Node packaging to be able to provide much practical help, but I guess you would have to distribute both the source files (for the Browserify users) and the |
the @ sign defines a scope. I'll see what I can do. I'm favoring the browserify or other bundler solution today. If you have time and are interested in helping out we could do a small brainstorm call to see how to proceed ... |
First, thanks for creating this – a very interesting project!
I installed the package using
npm install primo-explore-dom --save-dev
.Since I'm using browserify, the package wasn't included automagically, so I tried adding a
but when running gulp I got:
When looking at the
primo-explore-dom.js
file, I notice that it indeed requirescore-js
andregenerator-runtime
, but these are not declared in package.json. Should they?Also, I don't really understand how
custom.js
is built, and where the../../modules/core.regexp.escape
path in custom.js:34 comes from. Notice that it uses "modules" rather than "node_modules" – rather weird. Perhaps you can add a "Contribute" or "Develop" section to the README where you document how to build this project?The text was updated successfully, but these errors were encountered: