Skip to content

Commit

Permalink
fix: add type export for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nayonglin committed Dec 14, 2023
1 parent 434227d commit 45ddc19
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/webpack-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import type { Compiler, Configuration, Compilation } from 'webpack';
import { RawSource } from 'webpack-sources';
import cheerio from 'cheerio';

interface QiankunPluginOptions {
export type QiankunPluginOptions = {
packageName?: string;
entrySrcPattern?: RegExp; // 新增可选参数,用于匹配script标签
}
};

interface PackageJson {
export type PackageJson = {
name?: string;
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
}
};

class QiankunPlugin {
private packageName: string;
Expand Down Expand Up @@ -106,5 +106,4 @@ class QiankunPlugin {
return $.html();
}
}

module.exports = QiankunPlugin;

0 comments on commit 45ddc19

Please sign in to comment.