-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): fix typescript error when importing delivery options
- Loading branch information
1 parent
798a3aa
commit bf8af9f
Showing
10 changed files
with
84 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import {type ConfigEnv, type UserConfigFn} from 'vitest/config'; | ||
import {type UserConfig} from 'vite'; | ||
import {type UserConfig, type Alias} from 'vite'; | ||
import {type PromiseOr, type RecursivePartial} from '@myparcel/ts-utils'; | ||
|
||
declare function createViteConfig<>( | ||
config?: RecursivePartial<UserConfig> | ((env: ConfigEnv) => PromiseOr<RecursivePartial<UserConfig>>), | ||
): UserConfigFn; | ||
|
||
declare const resolveAlias: Alias[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import dts from 'vite-plugin-dts'; | ||
import {isCI} from 'ci-info'; | ||
import {createViteConfig} from '@myparcel-do/build-vite'; | ||
|
||
const dirname = new URL('.', import.meta.url).pathname; | ||
|
||
export default createViteConfig((env) => { | ||
const isProd = env.mode === 'production'; | ||
|
||
return { | ||
plugins: [dts({entryRoot: 'src'})], | ||
|
||
build: { | ||
sourcemap: !isCI && isProd, | ||
lib: { | ||
entry: { | ||
index: `${dirname}/src/index.ts`, | ||
testing: `${dirname}/src/__tests__/index.ts`, | ||
}, | ||
formats: ['es'], | ||
}, | ||
}, | ||
|
||
test: { | ||
setupFiles: [`${dirname}/src/__tests__/vitest-setup.ts`], | ||
}, | ||
}; | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters