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

[add] Add webpack support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

little-arhat
Copy link

To simplify using it in clojure script, for example.

@odf
Copy link
Contributor

odf commented Jul 30, 2015

This package consists of a single source file with no dependencies, so I don't understand the purpose of using webpack here. Can you lead me to any resources explaining how to write ClojureScript-friendly npm packages?

@little-arhat
Copy link
Author

Hi,

single source file with no dependencies, so I don't understand the purpose of using webpack here
This is the valid point and I'm with you on this.

One of the simplest way to use js libraries in ClojureScript project is to use cljsjs, that allows you to provide Google Closure externs and deps information, so the library can be wrapped as a jar. But when I tried to create this wrapper from the v0.0.4 of the plexus-validate I've got errors like module is undefined etc. So I've used webpack to create dist/plexus-validate.js that can be then used as clojure script package: cljsjs.plexus-validate.

I guess, one can add preamble with function(module, exports) { os smth like this at this will work, but I thought it might be easier to use webpack and get "minification" as well.

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

Successfully merging this pull request may close these issues.

2 participants