Skip to content

Commit 03298b1

Browse files
committed
fix(build): use named Parcel target to avoid exports field conflict
1 parent 94eb68d commit 03298b1

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ module.exports = {
3939
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
4040
},
4141
},
42-
ignorePatterns: ['dist'],
42+
ignorePatterns: ['dist', 'demo'],
4343
};

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
"build:types": "tsc",
2323
"build:js": "node esbuild.mjs",
2424
"build": "rm -rf dist && pnpm build:js && pnpm build:types",
25-
"start": "parcel src/examples/index.html --open",
25+
"start": "parcel src/examples/index.html --target app --open",
2626
"test": "LANG=en_GB jest",
2727
"test-ci": "LANG=en_GB.UTF-8 cross-env NODE_ICU_DATA=node_modules/full-icu jest",
2828
"typecheck": "tsc && tsc --project tsconfig.test.json",
2929
"lint": "eslint ./ --max-warnings=0",
30-
"gh-predeploy": "parcel build src/examples/index.html --dist-dir demo/examples --public-url ./",
30+
"gh-predeploy": "parcel build src/examples/index.html --target app",
3131
"gh-deploy": "pnpm gh-predeploy && gh-pages -d demo/examples",
3232
"ci": "pnpm && pnpm build",
3333
"semantic-release": "semantic-release"
@@ -99,7 +99,11 @@
9999
"targets": {
100100
"main": false,
101101
"module": false,
102-
"types": false
102+
"types": false,
103+
"app": {
104+
"distDir": "demo/examples",
105+
"publicUrl": "./"
106+
}
103107
},
104108
"minimumReleaseAge": 4320,
105109
"packageManager": "pnpm@10.16.1+sha512.0e155aa2629db8672b49e8475da6226aa4bdea85fdcdfdc15350874946d4f3c91faaf64cbdc4a5d1ab8002f473d5c3fcedcd197989cf0390f9badd3c04678706"

0 commit comments

Comments
 (0)