b-gran / object-editor-react

Schema-aware editor for structured JSON objects (drop-in React component)
https://b-gran.github.io/object-editor-react/githubExample.html
MIT License
123 stars 17 forks source link

Object editor styling broken on optimized production build #34

Open MadJayQ opened 4 years ago

MadJayQ commented 4 years ago

Hello,

I've been using this library as a crux piece for a tool i've been working on.

When running in my dev electron environment everything works exactly as expected; however, upon packaging my application using react-scripts build to create a production build it seems the styling is completely broken.

firefox_DdHGaIuVMY

Here is my package.json

{
  "name": "nhmcs-tool",
  "version": "0.1.0",
  "build": {
    "files": [
      "build/**/*",
      "node_modules/**/*"
    ],
    "directories": {
      "buildResources": "assets"
    }
  },
  "homepage": "./",
  "main": "public/electron.js",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.5.0",
    "@material-ui/icons": "^4.4.3",
    "@rescripts/cli": "0.0.12",
    "material-ui-icons": "^1.0.0-beta.36",
    "electron-is-dev": "^1.1.0",
    "node-uuid": "^1.4.8",
    "object-editor-react": "^1.0.6",
    "react": "^16.10.1",
    "react-dom": "^16.10.1",
    "react-scripts": "3.2.0",
    "aws-sdk": "^2.546.0",
    "typescript": "^3.6.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "electron-dev": "concurrently \"npm start\" \"electron .\"",
    "postinstall": "electron-builder install-app-deps",
    "preelectron-pack": "npm build",
    "electron-pack": "npm run build -mw",
    "electron-exec-pack": "electron-packager ./build nhmcstool --platform=win32 --arch=x64",
    "dist": "electron-builder"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "concurrently": "^5.0.0",
    "electron": "^6.0.11",
    "rescripts": "0.0.1-security",
    "electron-builder": "^21.2.0",
    "electron-packager": "^14.0.6"
  }
}
b-gran commented 4 years ago

Hi @MadJayQ, is your project publicly available? If your project is publicly available, I'll try to repro directly - otherwise let's put together a minimal repro of this issue.

b-gran commented 4 years ago

Hi @MadJayQ

I'm unable to repro this on the latest version, 1.1.0. Try downloading the latest version and see if there's still an issue