diff --git a/scripts/compilation/Inliner.js b/scripts/compilation/Inliner.js index 12d4b2efdb16..fe80482a8078 100644 --- a/scripts/compilation/Inliner.js +++ b/scripts/compilation/Inliner.js @@ -180,6 +180,16 @@ module.exports = class Inliner { }, }), ], + onwarn(warning) { + /* + Circular imports are not an error in the language spec, + but reasoning about the program and bundling becomes easier. + For that reason let's avoid them. + */ + if (warning.code === "CIRCULAR_DEPENDENCY") { + // throw Error(warning.message); + } + }, external: (id) => { const relative = !!id.match(/^\.?\.?\//); if (!relative) {