@prosopo/client-bundle-example 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@ docker compose --file ./docker/docker-compose.development.yml up -d && \
15
15
  npm i && \
16
16
  npm run build:all && \
17
17
  npm run setup:all && \
18
- NODE_ENV=production npm -w @prosopo/procaptcha-bundle run bundle && \
18
+ NODE_ENV=development npm -w @prosopo/procaptcha-bundle run bundle && \
19
19
  npm run start:all
20
20
  ```
21
21
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@prosopo/client-bundle-example",
3
3
  "main": "index.js",
4
+ "type": "module",
4
5
  "engines": {
5
6
  "node": ">=20",
6
7
  "npm": ">=9"
@@ -12,13 +13,14 @@
12
13
  "start": "vite serve ./src --port 9232 --config vite.config.ts",
13
14
  "clean": "echo 'nothing to clean'"
14
15
  },
15
- "version": "2.1.3",
16
+ "version": "2.1.5",
16
17
  "devDependencies": {
18
+ "@prosopo/dotenv": "2.1.5",
17
19
  "@types/node": "22.5.5",
18
20
  "@vitest/coverage-v8": "2.1.1",
19
21
  "concurrently": "9.0.1",
20
22
  "npm-run-all": "4.1.5",
21
- "rimraf": "6.0.1",
23
+ "del-cli": "6.0.0",
22
24
  "tslib": "2.7.0",
23
25
  "tsx": "4.19.1",
24
26
  "typescript": "5.6.2",
package/vite.config.ts CHANGED
@@ -11,12 +11,26 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- export default {
15
- watch: false,
16
- mode: "development",
17
- server: {
18
- https: false,
19
- host: true,
20
- cors: true,
21
- },
22
- };
14
+
15
+ import { loadEnv } from "@prosopo/dotenv";
16
+ import { type UserConfig, defineConfig } from "vite";
17
+
18
+ export default defineConfig(({ command, mode }) => {
19
+ loadEnv();
20
+ return {
21
+ watch: false,
22
+ mode: "development",
23
+ server: {
24
+ host: true,
25
+ cors: true,
26
+ },
27
+ define: {
28
+ "import.meta.env.PROSOPO_SITE_KEY": JSON.stringify(
29
+ process.env.PROSOPO_SITE_KEY,
30
+ ),
31
+ "import.meta.env.PROSOPO_SERVER_URL": JSON.stringify(
32
+ process.env.PROSOPO_SERVER_URL,
33
+ ),
34
+ },
35
+ } as UserConfig;
36
+ });