-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Steps to Reproduce:
- Have a webpack 4 project with typescript.
- Create file
TableRenderer.ts:
import { Table } from './Table';
const renderTable = (table: Table) => console.log(JSON.stringify(table));- Create file
Table.ts:
import * as TableRenderer from './TableRenderer';
export const renderMethods = TableRenderer;- Run webpack with
circular-dependency-pluginenabled.
Expected Result: Circular dependency of TableRenderer -> Table -> TableRenderer.
Actual Result: No circular dependency found.
Due to type erasure, and the circular-dependency-plugin's usage of compilation.hooks.optimizeModules, it looks like this isn't easily solvable. Perhaps there is a hook earlier in the webpack life cycle that provides dependencies prior to type erasure? I'm not sure.
Metadata
Metadata
Assignees
Labels
No labels