Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Can't build production file #176

@thojanssens

Description

@thojanssens

I used create react app to create my app. I ejected the config files as I had to add the following configs into webpack:

    output: {
      globalObject: 'this',
      //...
    module: {
      rules: [
        {
            test: /\.worker\.js$/,
            use: { loader: 'worker-loader' }
        },
        //...

But when I try to build for production (npm run build), no files are generated:

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

No files shows up after File sizes after gzip: and the build folder only contains favicon.ico and manifest.json.

The application works though when I launch it with npm start.

I tried using react-app-rewired to avoid ejecting, but I have the same problem anyway + another set of problems, so I gave up with this library...

When I remove the code specific to web workers, the build then works.

webpack version is "4.19.1",
worker loader version is "^2.0.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions