Skip to content

Commit

Permalink
modify PluginOptions to Options
Browse files Browse the repository at this point in the history
  • Loading branch information
jiawulin001 committed Jun 10, 2021
1 parent 39f54d9 commit 1c2fc45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite-plugin-commonjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const commonJSRegex: RegExp = /\b(module\.exports|exports\.\w+|exports\s*=\s*)/;
const requireRegex: RegExp = /require\(([\'|\"].*[\'|\"])\)/g;
const IMPORT_STRING_PREFIX: String = "__require_for_vite";

type PluginOptions = {
type Options = {
include?: string | RegExp | string[] | RegExp[] | undefined;
exclude?: string | RegExp | string[] | RegExp[] | undefined;
};

export default (options: PluginOptions = {}): Plugin => {
export default (options: Options = {}): Plugin => {
const filter = createFilter(options.include, options.exclude);

return {
Expand Down

0 comments on commit 1c2fc45

Please sign in to comment.