Cimpress-MCP / postal-codes-js

Provide postal code validation for javascript
Apache License 2.0
43 stars 36 forks source link

Package does not work depending how the consumer is bundled #79

Open jose-garrido-martinez opened 1 year ago

jose-garrido-martinez commented 1 year ago

Steps to reproduce

Problem

As serverless builds the required dependencies in just on output file and it tries to obtain the json files from the root folder of the output.

Workaround 1

Possible solution

Allowing to force using the format web (that adds the files with require, so they are included in the bundle). Added pull request: https://github.com/Cimpress-MCP/postal-codes-js/pull/78

lightwave commented 6 months ago

Same error when using Next.js