Skip to content

What is the right way to add a demo page to a Parcel built library ? #8087

Answered by mischnic
etiennehomer asked this question in General
Discussion options

You must be logged in to vote

Either you create a new directory in a monorepo setup, or if you want everything to be in a single place, do something like

{
    // ...,
    "main": "dist/index.js",
    "module": "dist/index.mjs",
    "targets": {
        "app": {}
    },
    "scripts": {
        "build": "parcel build src/index.js --target main --target module",
        "start-demo": "parcel demo/index.html --target app"
    }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by devongovett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants