File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ type AllowTransformOpts = Omit<
16
16
* @analyzeDependencies
17
17
* @pseudoClasses
18
18
* @unusedSymbols
19
+ * @errorRecovery
19
20
*/
20
21
>
21
22
@@ -30,18 +31,18 @@ export interface IMinifyPluginOpts extends AllowTransformOpts {
30
31
// loader
31
32
type AllowLoaderTransformOpts = Omit <
32
33
TransformOptions ,
33
- 'filename' | 'code' | 'targets'
34
+ 'filename' | 'code' | 'targets' | 'inputSourceMap'
34
35
/**
35
36
* allow
36
37
*
37
38
* @cssModules
38
39
* @minify
39
40
* @sourceMap
40
- * @targets
41
41
* @drafts
42
42
* @analyzeDependencies
43
43
* @pseudoClasses
44
44
* @unusedSymbols
45
+ * @errorRecovery
45
46
*/
46
47
>
47
48
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ import { getTargets } from './utils'
7
7
const LOADER_NAME = `parcel-css-loader`
8
8
export async function ParcelCssLoader (
9
9
this : LoaderContext < IParcelCssLoaderConfig > ,
10
- source : string
10
+ source : string ,
11
+ prevMap ?: Record < string , any >
11
12
) : Promise < void > {
12
13
const done = this . async ( )
13
14
const options = this . getOptions ( )
@@ -30,6 +31,8 @@ export async function ParcelCssLoader(
30
31
code : Buffer . from ( source ) ,
31
32
sourceMap : this . sourceMap ,
32
33
targets : getTargets ( { default : userTargets , key : ECacheKey . loader } ) ,
34
+ inputSourceMap :
35
+ this . sourceMap && prevMap ? JSON . stringify ( prevMap ) : undefined ,
33
36
...opts ,
34
37
} )
35
38
const codeAsString = code . toString ( )
You can’t perform that action at this time.
0 commit comments