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

Loading via webpack #181

Closed
chrishutchinson opened this issue Oct 22, 2015 · 5 comments
Closed

Loading via webpack #181

chrishutchinson opened this issue Oct 22, 2015 · 5 comments
Labels

Comments

@chrishutchinson
Copy link

Hey,

I've posted this on Gitter but thought I'd formally log an issue too.

I've not been able to successfully load this library using webpack via require('content-kit-editor'), after installing the library via npm .

My app is a scaffolded from https://github.com/newtriks/generator-react-webpack, and doesn't have any custom webpack config beyond what that generator provides out of the box.

Any help would be great 😸

@mixonic
Copy link
Contributor

mixonic commented Oct 22, 2015

Ah, we must enable CommonJS builds. This is akin to the changes we made in mobiledoc-dom-renderer.

And you'll end up needing to reference default, ala:

let { default: ContentKit } = require('content-kit-editor');

I'll aim to publish a the next npm version with CommonJS. Likely 0.5.0.

@mixonic mixonic added the bug label Oct 22, 2015
@chrishutchinson
Copy link
Author

Awesome thank you @mixonic! Any idea on the timeline for 0.5.0? We're looking to use this in a production tool soon, but need to run the editor through its paces before we can commit to using it!

Having CommonJS support will be part of that.

@mixonic
Copy link
Contributor

mixonic commented Oct 23, 2015

0.5.0 is waiting on copy/paste stabilizing, I think that is pretty much it. Perhaps today, early next week at the latest.

If the timing is important and you want to lend a hand, the commits I linked above should layout what needs to happen for CommonJS to be included in dist/ and usable via main.

mixonic added a commit to mixonic/content-kit-editor that referenced this issue Oct 27, 2015
@mixonic
Copy link
Contributor

mixonic commented Oct 27, 2015

@chrishutchinson care to give this a try today? You should be able to install 0.5.0-beta1 with CommonJS files.

npm install --save-dev content-kit-editor@0.5.0-beta1

@mixonic
Copy link
Contributor

mixonic commented Nov 3, 2015

@chrishutchinson 0.5.0 is out now, you should be good to go. Please re-open or let me know if you cannot get this working though!

@mixonic mixonic closed this as completed Nov 3, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants