2.8.2 • Published 2 years ago

@deot/dev-dever v2.8.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@deot/dev-dever

开发

  • 优先执行scripts下的dev

自定义配置

提供环境变量DEV_OPTIONS

interface DEV_OPTIONS {
	packageFolderName?: string;
	workspace?: string;
	entries: string[];
	html: string;
}

根目录创建dev.config.ts, 可以选择configShared合并或单独基于DEV_OPTIONS配置

也可以是z.dev.config.ts, 前缀主要是置底

import { mergeConfig, defineConfig } from 'vite';
import type { UserConfig } from 'vite';
import configShared from './node_modules/@deot/dev-dever/shared.config'; // 这样调用时才会被编译

export default mergeConfig(
	configShared,
	defineConfig({
		plugins: [
			vue(),
			react()
		]
	}) as UserConfig
);

dev.config.ts, 是为了方便从vite转其他开发工具时,可以不改变文件名

预加载配置preload.ts

会查找当前文件夹路径下往前查找preload.ts文件,直至process.cwd(),如果存件,就近添加preload.ts

文件查找优先级

  • z.dev.preload.ts
  • dev.preload.ts
  • z.preload.ts
  • preload.ts
2.8.2

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago

2.7.0

2 years ago

2.5.5

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.0.2

2 years ago

2.5.0

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.5.2

2 years ago

2.6.0

2 years ago

2.5.1

2 years ago

2.5.4

2 years ago

2.6.2

2 years ago

2.5.3

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago