Update common.mjs

This commit is contained in:
thororen1234 2025-02-12 15:48:03 -05:00
parent 67bacaf855
commit 6b4b853fc7
No known key found for this signature in database

View file

@ -364,7 +364,6 @@ const escapedBuiltinModules = builtinModules
const builtinModuleRegex = new RegExp(`^(node:)?(${escapedBuiltinModules})$`);
export const commonRendererPlugins = [
banImportPlugin(builtinModuleRegex, "Cannot import node inbuilt modules in browser code. You need to use a native.ts file"),
banImportPlugin(/^react$/, "Cannot import from react. React and hooks should be imported from @webpack/common"),
banImportPlugin(/^electron(\/.*)?$/, "Cannot import electron in browser code. You need to use a native.ts file"),
banImportPlugin(/^ts-pattern$/, "Cannot import from ts-pattern. match and P should be imported from @webpack/common"),