Skip to content

feat: add addWebpackPlugin#91

Merged
FezVrasta merged 5 commits into
arackaf:masterfrom
zhigang1992:feat/addWebpackPlugin
May 19, 2019
Merged

feat: add addWebpackPlugin#91
FezVrasta merged 5 commits into
arackaf:masterfrom
zhigang1992:feat/addWebpackPlugin

Conversation

@zhigang1992

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread readme.md Outdated

### addWebpackPlugin(plugin)

Adds the provided plugin info into webpack's plugin array. Pass an plugin defined with `new webpack.DefinePlugin({...})`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a plugin"

Comment thread package.json Outdated
{
"name": "customize-cra",
"version": "0.2.12",
"name": "@zhigang1992/customize-cra",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't edit the package.json, we'll do that when we release a new version

@zhigang1992 zhigang1992 May 19, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry... that wasn't meant to be included.

@FezVrasta FezVrasta merged commit 87ea209 into arackaf:master May 19, 2019
@kumarharsh

kumarharsh commented Jan 23, 2020

Copy link
Copy Markdown

It seems to me that I'll need to install webpack as a dev dependency just to use plugins. Am I correct? If that is the case, CRA throws a long error:

It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "webpack": "4.41.2"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree

@kurnal

kurnal commented Feb 24, 2021

Copy link
Copy Markdown

@kumarharsh have you been able to figure out how to add the webpack plugin. no matter what I do it does not append anything into ENV for me and it can't set any global variables.

@kumarharsh

kumarharsh commented Mar 1, 2021

Copy link
Copy Markdown

Sorry, I don't remember much (moved on from the project). I did manage to figure it out, but don't remember the specifics at all :)

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

Successfully merging this pull request may close these issues.

4 participants