This guide assumes that you're using Webpack and React.
Go ahead and run this command in your project directory (existing and new):
If you're starting a new project, then you can skip this step.
Documentation for this can be found in the Webpack Integration page. The only thing you really need to configure is:
paperclip-loader- compiles PC files to JSX.
style-loader- required since Paperclip emits CSS.
css-loader- required with style-loader.
file-loader- required for CSS files that have
url()'s in them & other media.
If you're using TypeScript, you can generate Typed Definitions from Paperclip files by running:
This will write
*.pc.d.ts files in in the same directory as their corresponding
*.pc file. I'd also recommend that you include
*.pc.d.ts in your
☝ This command will generate definitions files based on the compiler you're using. So if you're using
paperclip-compiler-react, then React
Typed Definition files will be generated for you. Configuration for the compiler can be found in the