rolldown-plugin-require-cjs 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10862,13 +10862,15 @@ function parseAst(sourceText, options, filename) {
|
|
|
10862
10862
|
//#endregion
|
|
10863
10863
|
//#region src/options.ts
|
|
10864
10864
|
function resolveOptions(options) {
|
|
10865
|
-
|
|
10866
|
-
|
|
10865
|
+
if (Array.isArray(options.shouldTransform)) {
|
|
10866
|
+
const { shouldTransform } = options;
|
|
10867
|
+
options.shouldTransform = (id) => shouldTransform.includes(id);
|
|
10868
|
+
}
|
|
10867
10869
|
return {
|
|
10868
10870
|
include: options.include || [/\.[cm]?[jt]sx?$/],
|
|
10869
10871
|
exclude: options.exclude || [/node_modules/, /\.d\.[cm]?ts$/],
|
|
10870
10872
|
order: "order" in options ? options.order : "pre",
|
|
10871
|
-
shouldTransform
|
|
10873
|
+
shouldTransform: options.shouldTransform
|
|
10872
10874
|
};
|
|
10873
10875
|
}
|
|
10874
10876
|
|