-
Hi! I have project for a React component and I'd like to have two builds: one for a website/demo/doc that show the component, one for the component itself as a library. The react component is in The project is written in typescript, and to bundle it I'm using the rollup powered utility called microbundle and a ts definition bundler called dts-bundle-generator. So that I have this package.json (I omitted unnecessary fields): {
"scripts": {
"build-doc": "parcel build src-doc/index.html ",
"build-lib": "microbundle --no-compress && dts-bundle-generator ./src/index.ts",
"start": "parcel src-doc/index.html",
},
"source": "src/index.ts",
"main": "build/index.js",
"types": "build/src/index.d.ts",
} The fields
Right now I'm thinking of a small script that adds Do you have any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Run |
Beta Was this translation helpful? Give feedback.
-
wow, really thanks for fast reply 💥⚡️, you rocks! I get:
|
Beta Was this translation helpful? Give feedback.
Run
parcel build src-doc/index.html --target default
instead to ignore these main fields in package.json