File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1
- import {
2
- defineConfig ,
3
- LibraryFormats ,
4
- LibraryOptions ,
5
- PluginOption ,
6
- } from 'vite' ;
1
+ import { defineConfig , LibraryFormats , PluginOption } from 'vite' ;
7
2
import webExtension , { readJsonFile } from 'vite-plugin-web-extension' ;
8
3
import zip from 'vite-plugin-zip-pack' ;
9
4
import * as path from 'path' ;
@@ -17,9 +12,8 @@ function useSpecialFormat(
17
12
return {
18
13
name : 'use-special-format' ,
19
14
config ( config ) {
20
- const shouldUse = entriesToUse . includes (
21
- ( config . build ?. lib as LibraryOptions ) ?. entry ,
22
- ) ;
15
+ const shouldUse =
16
+ config . build ?. lib && entriesToUse . includes ( config . build . lib . entry ) ;
23
17
if ( shouldUse ) {
24
18
config . build = config . build ?? { } ;
25
19
// @ts -expect-error: lib needs to be an object, forcing it.
You can’t perform that action at this time.
0 commit comments