Open savithapremkumar opened 6 years ago
I also ran into this problem. Would love to know a solution. I want to use YoastSEO.js in a React + Electron app.
@savithapremkumar @alexluong
If using babel-loader in your webpack config you can change the loader exclude
property configuration:
{
test: /\.jsx?$/,
exclude: /node_modules\/(?!(yoastseo)\/).*/,
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
},
}
},
This ignores all node_modules except yoastseo. It is also how they use it. See https://github.com/Yoast/wordpress-seo/blob/01b3bf65d11ad1f55a07882c4683dc13e0cd69cd/webpack/webpack.config.js#L72
Yoast seo worked with previous version of webpack
after updating webpack to version 3.12.0, yoast doesnt work with the error "Uncaught TypeError: Cannot assign to read only property 'exports' of object '#
package yoast with webpack using this command : "npm run cross-env NODE_ENV=production webpack --progress --hide-modules"
Hint : looks like this is linked to this issue : https://github.com/webpack/webpack/issues/3997
Technical info