diff --git a/jsr.json b/jsr.json index 9f69df6..65e7406 100644 --- a/jsr.json +++ b/jsr.json @@ -1,10 +1,10 @@ { "name": "@idleberg/vite-plugin-valibot-env", "version": "0.6.9", - "exports": "./index.ts", + "exports": "./src/index.ts", "publish": { "include": [ - "index.ts", + "src/", "jsr.json", "LICENSE", "README.md" diff --git a/package.json b/package.json index 69af565..edf5ec5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ ], "scripts": { "build": "tsup", - "dev": "tsup --watch --onSuccess \"tsup --dts-only \"", + "dev": "tsup --watch", "lint:code": "eslint **/*.json **/*.ts --no-warn-ignored", "lint:deps": "knip --production", "lint": "npm-run-all --parallel lint:*", diff --git a/index.ts b/src/index.ts similarity index 100% rename from index.ts rename to src/index.ts diff --git a/tests/fixtures/vite-invalid.config.ts b/tests/fixtures/vite-invalid.config.ts index aa58689..323c61d 100644 --- a/tests/fixtures/vite-invalid.config.ts +++ b/tests/fixtures/vite-invalid.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'vite'; import * as v from 'valibot'; -import valibotPlugin from '../../index.ts'; +import valibotPlugin from '../../src/index.ts'; const envSchema = v.object({ VITE_INVALID_BIC: v.pipe(v.string(), v.bic()), diff --git a/tests/fixtures/vite-no-prefix.config.ts b/tests/fixtures/vite-no-prefix.config.ts index 88657ed..ba577c4 100644 --- a/tests/fixtures/vite-no-prefix.config.ts +++ b/tests/fixtures/vite-no-prefix.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'vite'; import * as v from 'valibot'; -import valibotPlugin from '../../index.ts'; +import valibotPlugin from '../../src/index.ts'; const envSchema = v.object({ NODE_ENV: v.union([v.literal('development'), v.literal('production')]), diff --git a/tests/fixtures/vite-transform.config.ts b/tests/fixtures/vite-transform.config.ts index b6e1ad1..ceee60e 100644 --- a/tests/fixtures/vite-transform.config.ts +++ b/tests/fixtures/vite-transform.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'vite'; import * as v from 'valibot'; -import valibotPlugin from '../../index.ts'; +import valibotPlugin from '../../src/index.ts'; const envSchema = v.object({ VITE_TRUE: v.boolean(), diff --git a/tests/fixtures/vite-valid.config.ts b/tests/fixtures/vite-valid.config.ts index af4d557..3cd3617 100644 --- a/tests/fixtures/vite-valid.config.ts +++ b/tests/fixtures/vite-valid.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'vite'; import * as v from 'valibot'; -import valibotPlugin from '../../index.ts'; +import valibotPlugin from '../../src/index.ts'; const envSchema = v.object({ VITE_VALID_BIC: v.pipe(v.string(), v.bic()), diff --git a/tsup.config.ts b/tsup.config.ts index 7b94fe9..c1208b1 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig((options) => { target: 'node18', clean: true, dts: true, - entry: ['index.ts'], + entry: ['src/index.ts'], format: 'esm', minify: !options.watch, treeshake: 'recommended',