Describe the bug
In Vendure document, there are Province Entity and ProvinceService but not available in @vendure/core
To Reproduce
In a vendure project If you do
import { ProvinceService, Province } from '@vendure/core'
You will get error
"@vendure/core"' has no exported member named 'ProvinceService'.
"@vendure/core"' has no exported member named 'Province'.
Expected behavior
Both ProvinceService and Province are exported from @vendure/core
Actual behavior
You will get error
"@vendure/core"' has no exported member named 'ProvinceService'.
"@vendure/core"' has no exported member named 'Province'.
Environment (please complete the following information):
- @vendure/core version: 3.6.3
- Nodejs version: v24.10.0
- Database (mysql/postgres etc): postgres
- Operating System (Windows/macOS/Linux): macOS
- Package manager (npm/yarn/pnpm): npm
Workaround
If you would like to create a zone with province member: You can
- create Region with type
province and point a parent in Country entity, and use script to add the province as a member into a Zone.
Additional context
- As I was trying to setup Tax Zone for US, which state (province) tax play important role on the setup. I stumpped into this issue.
- Currently, Zone (tax zone) can only be configured (via dashboard) with members from Country. However, in original Vendure setup, it should be able to configure with any thing in Region entity, or say, Province (Both Province and Country extends the Region entity)
- To clear the issue, it might be as easy as to add the following to the package
// in `packages/core/src/entity/index.ts`
export * from './region/province.entity';
and
// in packages/core/src/service/index.ts
export * from './services/province.service.ts'
- However, it would also be nice to have:
- In dashboard -> Settings
- Additional
Province setting that allow user to create province through dashboard, and
- In
Zone setting, one can define member from Province (instead of just from Country)
- In @vendure/create: user can populate Province with json file, similar to populate Country for initial dataset.
Describe the bug
In Vendure document, there are Province Entity and ProvinceService but not available in @vendure/core
To Reproduce
In a vendure project If you do
You will get error
Expected behavior
Both ProvinceService and Province are exported from @vendure/core
Actual behavior
You will get error
Environment (please complete the following information):
Workaround
If you would like to create a zone with province member: You can
provinceand point a parent in Country entity, and use script to add the province as a member into a Zone.Additional context
and
Provincesetting that allow user to create province through dashboard, andZonesetting, one can define member from Province (instead of just from Country)