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<
1616 * @analyzeDependencies
1717 * @pseudoClasses
1818 * @unusedSymbols
19+ * @errorRecovery
1920 */
2021>
2122
@@ -30,18 +31,18 @@ export interface IMinifyPluginOpts extends AllowTransformOpts {
3031// loader
3132type AllowLoaderTransformOpts = Omit <
3233 TransformOptions ,
33- 'filename' | 'code' | 'targets'
34+ 'filename' | 'code' | 'targets' | 'inputSourceMap'
3435 /**
3536 * allow
3637 *
3738 * @cssModules
3839 * @minify
3940 * @sourceMap
40- * @targets
4141 * @drafts
4242 * @analyzeDependencies
4343 * @pseudoClasses
4444 * @unusedSymbols
45+ * @errorRecovery
4546 */
4647>
4748
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ import { getTargets } from './utils'
77const LOADER_NAME = `parcel-css-loader`
88export async function ParcelCssLoader (
99 this : LoaderContext < IParcelCssLoaderConfig > ,
10- source : string
10+ source : string ,
11+ prevMap ?: Record < string , any >
1112) : Promise < void > {
1213 const done = this . async ( )
1314 const options = this . getOptions ( )
@@ -30,6 +31,8 @@ export async function ParcelCssLoader(
3031 code : Buffer . from ( source ) ,
3132 sourceMap : this . sourceMap ,
3233 targets : getTargets ( { default : userTargets , key : ECacheKey . loader } ) ,
34+ inputSourceMap :
35+ this . sourceMap && prevMap ? JSON . stringify ( prevMap ) : undefined ,
3336 ...opts ,
3437 } )
3538 const codeAsString = code . toString ( )
You can’t perform that action at this time.
0 commit comments