Skip to content
Tom Wilson edited this page Jun 12, 2019 · 1 revision

ipress2

Adding assets to your site can be done many ways, the key is to get your assets into your dist folder after the build completes.

Copy Assets

Create a dir in the root project called assets or whatever you want to call it. Then add your asset files to this directory.

Then in your package.json add a copy:assets script and append it to the build script.

{
  "scripts": {
     "build": "run-s ... copy:assets",
     ...
     "copy:assets": "cp -rf assets dist/"
  }
}

The next time you run npm run build it will create your assets in your dist folder

Clone this wiki locally