mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 10:54:44 +00:00
feat(packages/stdlib): change build system to unbuild
This commit is contained in:
10
packages/stdlib/build.config.ts
Normal file
10
packages/stdlib/build.config.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { defineBuildConfig } from 'unbuild';
|
||||||
|
|
||||||
|
export default defineBuildConfig({
|
||||||
|
rollup: {
|
||||||
|
emitCJS: true,
|
||||||
|
esbuild: {
|
||||||
|
minify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -26,29 +26,28 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "./dist/stdlib.umd.js",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/stdlib.js",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/stdlib.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./dist/stdlib.js",
|
"import": "./dist/index.mjs",
|
||||||
"require": "./dist/stdlib.umd.js",
|
"require": "./dist/index.cjs",
|
||||||
"types": "./dist/stdlib.d.ts"
|
"types": "./dist/index.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:coverage": "vitest run --coverage",
|
"test:coverage": "vitest run --coverage",
|
||||||
"test:bench": "vitest bench",
|
"test:bench": "vitest bench",
|
||||||
"dev": "vite build --watch",
|
"dev": "vitest",
|
||||||
"build": "vite build"
|
"build": "unbuild"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@robonen/tsconfig": "workspace:*",
|
"@robonen/tsconfig": "workspace:*",
|
||||||
"@vitest/coverage-v8": "^1.5.0",
|
"@vitest/coverage-v8": "^1.5.0",
|
||||||
"pathe": "^1.1.2",
|
"pathe": "^1.1.2",
|
||||||
"vite": "^5.2.9",
|
"vitest": "^1.5.0",
|
||||||
"vite-plugin-dts": "^3.8.3",
|
"unbuild": "^2.0.0"
|
||||||
"vitest": "^1.5.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": "@robonen/tsconfig/tsconfig.json",
|
"extends": "@robonen/tsconfig/tsconfig.json"
|
||||||
}
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import { defineConfig } from 'vite';
|
|
||||||
import dts from 'vite-plugin-dts';
|
|
||||||
import { resolve } from 'pathe';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
name: 'Stdlib',
|
|
||||||
fileName: 'stdlib',
|
|
||||||
entry: resolve(__dirname, './src/index.ts'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': resolve(__dirname, './src'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
dts({
|
|
||||||
insertTypesEntry: true,
|
|
||||||
exclude: '**/*.test.ts',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
/* Basic Options */
|
/* Basic Options */
|
||||||
"module": "Preserve",
|
"module": "Preserve",
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
|
"lib": ["ESNext"],
|
||||||
"moduleResolution": "Bundler",
|
"moduleResolution": "Bundler",
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
|
|
||||||
/* Library transpiling */
|
/* Library transpiling */
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"composite": true,
|
// "composite": true,
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"declarationMap": false
|
"declarationMap": false
|
||||||
},
|
},
|
||||||
|
|||||||
1977
pnpm-lock.yaml
generated
1977
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user