Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with multiple entries #1765

Open
Hujianboo opened this issue Nov 17, 2021 · 0 comments
Open

How to deal with multiple entries #1765

Hujianboo opened this issue Nov 17, 2021 · 0 comments

Comments

@Hujianboo
Copy link

Hujianboo commented Nov 17, 2021

webpack version: 5.59.1
webpack-dev-server version: 4.3.1
react version: 17.0.2

the document only gives the example of one entry. but now my project requires multiple entries just like this but does not work

entry: {
    'app':["react-hot-loader/patch","webpack-dev-server/client?http://localhost:8080","./index.tsx"],   
    'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',   
    'json.worker': 'monaco-editor/esm/vs/language/json/json.worker',   
    'css.worker': 'monaco-editor/esm/vs/language/css/css.worker',   
    'html.worker': 'monaco-editor/esm/vs/language/html/html.worker',   
    'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker'
  },

I add the hot loader to every entry but also does not work.

entry: {
    'app':["react-hot-loader/patch","webpack-dev-server/client?http://localhost:8080","./index.tsx"],   
    'editor.worker': ['react-hot-lodaer/patch','monaco-editor/esm/vs/editor/editor.worker.js',]
    ......
  },

the error snapshot is this

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant