You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to configure imagemin-webpack-plugin through react-app-rewired without your plugin and I get:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.plugins[10] should be one of these:
object { apply, … } | function
-> Plugin of type object or instanceof Function
Details:
* configuration.plugins[10] should be an object.
-> Plugin instance
* configuration.plugins[10] should be an instance of function
-> Function acting as plugin
When I add in my config-overrides.js:
constImageminPlugin=require('imagemin-webpack-plugin').defaultmodule.exports={webpack: (config,env)=>{config.plugins.push([// Make sure that the plugin is after any plugins that add imagesnewImageminPlugin({disable: process.env.NODE_ENV!=='production',// Disable during developmentpngquant: {quality: '95-100'}}),]);},}
I am looking at your plugin but it seems to include the dependencies imagemin-webpack-plugin with an outdated version, is this still up to date?
If so, should we update the version here?
I tried to still install near the next version it and this is what I got:
I believe since the new version is major, the 1.6.1 is used.
I do not have any logs that prouve that this plugin work while I type npm run build:
>export REACT_APP_ENV=${REACT_APP_ENV:-prod}; cp src/config/env/.env.${REACT_APP_ENV} .env.local; react-app-rewired build
Creating an optimized production build...
(node:404) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Compiled successfully.
File sizes after gzip:
163.25 KB build/static/js/2.92f2f819.chunk.js
27.44 KB build/static/js/main.4336c6a3.chunk.js
24.52 KB build/static/css/2.b3012d7c.chunk.css
11.68 KB build/static/css/main.ce99caf8.chunk.css
2.22 KB build/static/js/3.7e6c35ce.chunk.js
1.18 KB build/static/js/runtime-main.9ddf168b.js
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
I tried within config-overrides.js to do writeFileSync('webpackconfig.json', JSON.stringify(config, null, 2), 'utf8');, and it seems that this configuration does not include anything related to the plugin...
Any clue on how to use it and ensure it's used? File size of media within that lib are equals...
Thanks for sharing!
The text was updated successfully, but these errors were encountered:
Hi, I am trying to configure
imagemin-webpack-plugin
throughreact-app-rewired
without your plugin and I get:When I add in my
config-overrides.js
:I am looking at your plugin but it seems to include the dependencies
imagemin-webpack-plugin
with an outdated version, is this still up to date?If so, should we update the version here?
I tried to still install near the next version it and this is what I got:
I believe since the new version is major, the 1.6.1 is used.
I do not have any logs that prouve that this plugin work while I type
npm run build
:I tried within
config-overrides.js
to dowriteFileSync('webpackconfig.json', JSON.stringify(config, null, 2), 'utf8');
, and it seems that this configuration does not include anything related to the plugin...Any clue on how to use it and ensure it's used? File size of media within that lib are equals...
Thanks for sharing!
The text was updated successfully, but these errors were encountered: