Skip to content

Can't create webpack module with dependOn for import #15616

@lavcraft

Description

@lavcraft

Hello. I would like to create three entry points with, on of them is shared.

I'm trying to use dependOn entry option. When i will have been added dependOn into entry, entry format changed.

Run code like this in my frontend application:

import * as X from 'module'; console.log(X);

And see for module with dependOn: :
image

Also for module without dependOn: :
image

I don't understand, how to right use dependOn for share some code between entris, because when i use it, i will see the import problem described above. Anyone could help, and explain how do it right? I can contribute into examples.

My reproducible example - https://github.com/lavcraft/react-hooks-composition-in-webpack-entry-problem-example

PS: I'm tried differente entry.library.type - all produce different kind of errors. Screenshots above made with entry.library.type: 'this' for debug purposes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions