Skip to content

Commit

Permalink
fix(rspack): the reportCodeType is not work problem (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
easy1090 authored Jun 5, 2024
1 parent 3107f94 commit ff461c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions examples/rsbuild-minimal/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default defineConfig({
{
disableClientServer: !process.env.ENABLE_CLIENT_SERVER,
features: ['bundle', 'plugins', 'loader', 'resolver'],
reportCodeType: {
noAssetsAndModuleSource: true,
},
},
]);
},
Expand Down
9 changes: 2 additions & 7 deletions packages/rspack-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ import type {
RsdoctorPluginOptionsNormalized,
RsdoctorRspackPluginOptions,
} from '@rsdoctor/core';
import {
Constants,
Linter,
Manifest as ManifestType,
SDK,
} from '@rsdoctor/types';
import { Constants, Linter, Manifest as ManifestType } from '@rsdoctor/types';
import path from 'path';
import { pluginTapName, pluginTapPostOptions } from './constants';
import { cloneDeep } from 'lodash';
Expand Down Expand Up @@ -55,7 +50,7 @@ export class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]>
new RsdoctorWebpackSDK({
name: pluginTapName,
root: process.cwd(),
type: SDK.ToDataType.Normal,
type: this.options.reportCodeType,
config: { disableTOSUpload: this.options.disableTOSUpload },
innerClientPath: this.options.innerClientPath,
});
Expand Down

0 comments on commit ff461c1

Please sign in to comment.