This repository was archived by the owner on Aug 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import { cache as Cache } from './deps.ts';
3
3
import { posix } from './deps.ts' ;
4
4
5
5
interface Importmap {
6
- imports ?: { [ key : string ] : string } ,
6
+ imports ?: { [ key : string ] : string } ;
7
7
scope ?: {
8
- [ key : string ] : { [ key : string ] : string }
9
- } ,
8
+ [ key : string ] : { [ key : string ] : string } ;
9
+ } ;
10
10
}
11
11
12
12
interface Options {
@@ -30,14 +30,14 @@ function esbuildCachePlugin(options: Options): esbuild.Plugin {
30
30
name : 'esbuild-cache-plugin' ,
31
31
setup ( build ) {
32
32
// resolve import map
33
- for ( const importName in imports ) {
33
+ for ( const importName in imports ) {
34
34
const filter = new RegExp ( `^${ importName } $` , 'i' ) ;
35
35
36
36
build . onResolve ( { filter } , ( args ) => {
37
37
let path = imports [ args . path ] ;
38
- for ( const scopePath in scope ) {
39
- if ( ! posix . relative ( scopePath , args . importer ) . startsWith ( '..' ) ) {
40
- if ( args . path in scope [ scopePath ] ) {
38
+ for ( const scopePath in scope ) {
39
+ if ( ! posix . relative ( scopePath , args . importer ) . startsWith ( '..' ) ) {
40
+ if ( args . path in scope [ scopePath ] ) {
41
41
path = scope [ scopePath ] [ args . path ] ;
42
42
}
43
43
}
You can’t perform that action at this time.
0 commit comments