Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Cannot read property 'tap' of undefined #67

Open
conspyrosy opened this issue Jan 8, 2019 · 1 comment
Open

Cannot read property 'tap' of undefined #67

conspyrosy opened this issue Jan 8, 2019 · 1 comment

Comments

@conspyrosy
Copy link

conspyrosy commented Jan 8, 2019

I am trying to follow the following tutorial: https://www.purgecss.com/guides/react with the bootstrap.css file.

I have create a fresh create-react-app, ejected the project and modified my webpack file to include the plugins but i'm seeing the following error when i npm run build "Cannot read property 'tap' of undefined".
I have tried nuking the whole repo, starting fresh and i end up with the same error.

Here's the only part of the webpack file i've changed for reference (apart from importing glob and purgecssplugin at the top).

plugins: [ PnpWebpackPlugin, new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), new MiniCssExtractPlugin({ filename: "[name].css", }), new PurgecssPlugin({ paths: glob.sync(``${paths.appSrc}/**/*``, { nodir: true }), }), ], },

The backticks in the code above are single, i dont know how to escape them.

Any help is appreciated. Thanks.

@jsnanigans
Copy link
Collaborator

Sounds like there is a bug when using the webpack api, ill look into this when I have time

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants