diff --git a/src/content/configuration/entry-context.mdx b/src/content/configuration/entry-context.mdx index 18e4187c7734..ca4fd9640919 100644 --- a/src/content/configuration/entry-context.mdx +++ b/src/content/configuration/entry-context.mdx @@ -12,6 +12,7 @@ contributors: - anshumanv - snitin315 - hai-x + - cengizilhan --- The entry object is where webpack looks to start building the bundle. The context is an absolute string to the directory that contains the entry files. @@ -173,6 +174,19 @@ module.exports = { }; ``` +### Multiple Entry Points in Different Folders + +In some scenarios, you might want to organize your entry points into different folders for better structure and maintainability. Here's how you can define multiple entry points located in different folders: + +```javascript +module.exports = { + entry: { + '/scriptFolder/one/app': './src/one/app.js', + '/scriptFolder/two/main': './src/two/main.js', + }, +}; +``` + For example: you can use dynamic entries to get the actual entries from an external source (remote server, file system content or database): **webpack.config.js**