Here is my case:
I initialized a project using create-react-app and I just figured out that using antd will be difficult.
I followed the steps in the dedicated part on ant design web site and it doesn't work. I tried to eject my project but when I do I have an error 'config' already exists in your app folder (I don't know what is that config).
I can't make ant working. I tried to add a simple button with the ant style but in the browser the button is a basic html button.
My question is: is there a way to use antd after creating a react application using CRA ?
I've read a lot of stuff on internet but accordingly to these posts and commentaries, nothing seems to work. Should I create a new project ?
Thanks a lot !
Ok I found the solution.
I followed the steps here ant.design/docs/react/use-with-create-react-app and my mistake was installing babel-import-plugin globaly instead of directly in the project. So everything seems to work now.
Sorry for that and thanks #iagowp for the help.
Related
I'm currently implementing the Monaco Editor from Microsoft (https://github.com/microsoft/monaco-editor), with a plugin for yaml validation, autocompletion, etc. . (https://github.com/remcohaszing/monaco-yaml) in our react js APP.
Maybe it is also important to tell you, that our authentication process gets managed via Keycloak.
When I'm running my code in development (React-scripts start) everything is working as expected.
I can create the editor, the schema gets implemented correctly and autocompletion is also working.
BUT as soon as I try to use the editor in PRODUCTION Build it seems that it cant load my workers correctly, following the editor is not working as it should.
I always get these errors in production:
I tried to use monaco-editor-webpack-plugin with React Rewired but it didnt have an positive effect either.
I also tried to use the worker loader to load the workers, but it also didnt help
Any more Ideas how I can fix this ? Has this to do something with CORS ? Because it tries to load files in a url? Or am I missing something ?
Thanks in advance
What I tried: Monaco Webpack Plugin, plain webpack, worker-loader
Expected Behaviour: Monaco Editor with Monaco Yaml working in production build.
Current behaviour: Working fine in development build, cannot load workers in production.
The problem was, that my keycloak (on a different port) rejected to load the working scripts. After handling this problems, the editor is working fine.
Localhost
Gitpage
The bar chart is working fine in localhost but after hosting on gitpage it's not showing properly. What to do?
Repo: https://github.com/mzs21/bar-chart
Live: https://mzs21.github.io/bar-chart/
The JS appears to be working ok and the app is running OK but I think the CSS is missing, so I completely understand your confusion!
You're using Tailwind so I'm going to assume that the Git pages deploy does not trigger the Tailwind build process. As that's done transparently locally you would not be 'hosting' the CSS that you would see.
I know posting links is naughty but as you're new have a read of this blog: https://harrywang.medium.com/introducing-tailpages-tailwind-github-pages-89903c52d3ec
have very simple sample app which build Create React App + Styled-Components to prove this issue. But I have real big application which I am facing this issue which I am going to explain it below.
I would like to pre-render this app with Rendertron for SEO/GoogleBots and etc. But the problem is when I build PRODUCTION version of React App which use Styled-Components . all the style will be missing on static version which Rendertron produced, but from other side if I try the same workflow with dev-server of app , everything looks fine .
So far I know there is different on PROD version and DEV version of my application when I render it with Rendertron . But I am not sure what cause this issue and how I can fix this issue .
I am looking for solution or idea which can help me to solve this issue .
Here is my sample code which I peppered for test .
https://github.com/AJ-7885/test-styled-component-with-rendertron
Here is screen shot from different version of Rendered version by Rendertron base on PROD or DEV version of the same application .
enter image description here
After a lot of searching around, I finally found out the reason. The Styled Components library uses something called the "Speedy mode" to inject styles on production. This makes the styles bypass the DOM` and be injected directly inside the CSSOM, thus, appearing in the inspector, but totally invisible on the DOM.
Fortunately, Styled Components 4.1.0 came with a fix for this issue! Now you can set a global variable called SC_DISABLE_SPEEDY to true in order to disable the Speedy mode and get the styles to appear on Production as well.
Reference: https://www.styled-components.com/releases#v4.1.0
But the only part I am not sure , how to set disable this Speedy Mode in Create-React-App without Ejecting , Dose any body has any idea ?
You need to render your styles on the server side and inject those styles in your pre-rendered react app. Styled-components explains how to do that here: https://www.styled-components.com/docs/advanced#server-side-rendering
Also, I'd recommend using react-snap for pre-rendering since that is recommended by the Create React App docs. react-snap seems to be more of a React-specific solution that may be easier to implement, especially with styled-components.
I cant able to run applozic-web fullview ui with meteor (1.4.2.6).
(https://github.com/AppLozic/Applozic-Web-Plugin)
I've put src folder under /client/compatiblity folder. I'm newbie and i'm not sure how exactly use jquery plugins. Here is my html code is on http://pastebin.com/6canHZnK
respective js code is nearly empty.
I got ui screen with no functionality.
Thanks in advance.
I minified/built my app that uses ExtJS 4.2.0 (free version) using Sencha SDK Tools 2.0.0 beta3, and the app was built successfully. However, when I try deleting the old "app" folder containing my old classes, the app no longer works.
I also tried generating a new app using Sencha CMD 4.0.1.45 and then adding my classes, but the results are the same.
I am confused why this happens, because as I understood it, your old classes are not needed to deploy production app. In fact, the only javascript files you need to include in your "index.html" file are "ext.js" and "app-all.js".
I used Firebug and saw in the DOM that the app, along with my classes, are loaded.
I also noticed that "app-all.js" defines classes like this:
Ext.define("MyApp.view.MyClass"...
Is this really how it is supposed to behave? or am I missing something?
Thanks in advance!
Okay, I got it. A .js file in my application calls Ext.require on itself, causing the app wiring go crazy.