Skip to content

Webpack virtual module supports #881

@pupaxxo

Description

@pupaxxo

Hi,

the stimulus-bridge plugin make use of webpack-virutal-module plugin to dynamically compile new modules according to the defined controllers.json file. Would it make sense to extend and prepare something to dynamically load entries from a json file?

Something like this

# webpack.config.js

Encore
  .addDynamicEntries('assets/pages.json')
# pages.json

{
  "entries": {
    "security_login": "./assets/pages/security/login.js",
    "security_register": "./assets/pages/security/register.js"
  }
}

We have a lot of page-specific entries and always adding it to the webpack configuration (with the need of restart it every time) is becoming a mess.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions