diff --git a/package.json b/package.json index bc9ac9a..5c93d0f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.16.0", + "version": "0.16.1", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick", @@ -35,9 +35,6 @@ "exports": { ".": { "types": "./dist/index.all.d.ts", - "browser": "./dist/index.browser.js", - "import": "./dist/index.node.js", - "require": "./dist/index.node.cjs", "node": "./dist/index.node.js", "default": "./dist/index.browser.js" } diff --git a/src/index.spec.ts b/src/index.spec.ts index fda069d..1b7a62e 100644 --- a/src/index.spec.ts +++ b/src/index.spec.ts @@ -86,7 +86,7 @@ describe('treeshake', () => { it('should shake it in dist as well', async () => { const code = ` - import { arrayUnion } from '../dist/index.browser.js' + import { arrayUnion } from '..' let a = [1,2,3,3,4] let aa = arrayUnion(a) diff --git a/tsconfig.json b/tsconfig.json index ff30385..9ca8dfb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,7 @@ }, "include": [ "src/**/*.ts", + "tsup.config.ts", "vitest-setup.ts" ], "exclude": [ diff --git a/tsup.config.ts b/tsup.config.ts index d6e36c3..e92dcde 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -11,14 +11,13 @@ export const tsup: Options = { sourcemap: env === 'production', // source map is only available in prod clean: true, // rimraf disr dts: true, // generate dts file for main module - format: ['cjs', 'esm'], // generate cjs and esm files + format: ['esm', 'cjs'], // generate cjs and esm files minify: false, // env === 'production', bundle: false, // env === 'production', - skipNodeModulesBundle: true, + // skipNodeModulesBundle: true, entryPoints: ['src/index.all.ts'], // watch: env === 'development', target: 'es2020', outDir: 'dist', // env === 'production' ? 'dist' : 'lib', - // entry: ['src/**/*[!.spec].ts'], entry: ['src/**/*.ts'], }