Skip to content

How to use zip.js with create-react-app? #258

Discussion options

You must be logged in to vote

create-react-app uses webpack 4 under the hood to build the application and webpack 4 does not fully support web workers without an additional loader.

To fix this issue, you must include the loader @open-wc/webpack-import-meta-loader in your project. You can do this by using for example react-app-rewired and following these steps:

  1. run npm install react-app-rewired --save-dev to install react-app-rewired
  2. run npm install @open-wc/webpack-import-meta-loader --save-dev to install @open-wc/webpack-import-meta-loader
  3. create a file named config-overrides.js in the root folder of your project and paste the following content:
module.exports = function override(config, env) {
    config.module.rules

Replies: 4 comments 12 replies

This comment has been hidden.

@JosePereira97

This comment has been hidden.

@iquasere

This comment has been hidden.

Comment options

You must be logged in to vote
7 replies
@iquasere

This comment has been hidden.

@gildas-lormeau

This comment has been hidden.

@iquasere

This comment has been hidden.

@gildas-lormeau

This comment has been hidden.

@huangminsky
Comment options

Answer selected by JosePereira97

This comment has been hidden.

@gildas-lormeau

This comment has been hidden.

Comment options

You must be logged in to vote
2 replies
@abduraufsherkulov
Comment options

@puxiao
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants