Comment on page
Using the Bundled Source
But, if you'd rather install Slate by simply adding a
<script>tag to your application, this guide will help you. To make the "bundled" use case simpler, each version of Slate ships with a bundled source file called
To get a copy of
slate.js, download the version of Slate you want from npm:
npm install slate@latest
And then look in the
node_modulesfolder for the bundled
A minified version called
slate.min.jsis also included for convenience.
Before you can add
slate.jsto your page, you need to bring your own copy of
react-dom-server, like so:
This ensures that Slate isn't bundling its own copy of React, which would greatly increase the file size of your application.
Then you can add
slate.jsafter those includes:
That's it, you're ready to go!