-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image upload does not work after building for production version #157
Comments
Just tested this and I'm seeing the same thing. |
Same thing in production mode! By inspecting in the console the editor object created you can see how it does not have all the configurations given to the uploader options. |
The issue is in isJoditObject:
|
You can configure the minimizer to ignore the Jodit function name during mangle. I achieve this in Vue by editing
How you would do this in React I am not sure. But I am sure it would be similar. |
If you are using Webpack 3 and UglifyJsPlugin this will work:
|
I also have the same issue in production. |
+1 |
Worked here. Thank you! 👍 |
Hi, I am still having this issue, check my below code:
NB: I just want to save the image uploaded as base64URI hence I made my URL empty. It works locally but it is not working in production mode gives me Please help guys, I've been pulling my hair since the beginning of the week. |
If you use WebPack4, the solution is install terser-webpack-plugin npm install terser-webpack-plugin --save-dev and in module.export put:
|
Workaround for this issue for Laravel Mix, use config below in webpack.mix.js:
|
Hi there, optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
keep_fnames: true,
},
}),
],
}, All the other default settings can be avoided. Thanks anyway! |
Thanks it worked for me, |
For laravel mix, if its version is 4 or higher use the following config in webpack.mix.js
|
In react ( nextjs)
Check in config at your webpack |
I found the solution which works on both development and production build.. solved using UglifyJsPlugin, config changes in webpack..
download project and check in the webpack config file. |
英文水平不好,看的好吃力,全部看完,发现还是不能用,还是一样的问题。 最后看着样子画瓢搞好了 然后 引入 配置 搞定 |
I am trying to upload image in a react application. I have used the jodit-react library for this. This worked fine in development mode. But after pushing to production, it didn't. It was throwing an error in the bottom right side of the editor saying
Need URL for AJAX request
. Considering that might be a problem of jodit-react library, I tried to use the original one. But this was also throwing the same error.Jodit Version: 3.2.44
Code
Expected behavior:
Image upload should work in both production and development mode in react.
Actual behavior:
Note:
I could have created the issue under jodit-react repo, but that one doesn't look very active like this one. But in case you want to move it there, kindly let me know.
The text was updated successfully, but these errors were encountered: