webcodesk / webcodesk-srv

Webcodesk - Web App Builder for Create React App

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Name mangling for components in relation to page schema

arifnpm opened this issue · comments

There is a concern if we want to minimize the entire app that the name mangling will cause the schema to be invalid as the page schema is defined as the unmangled path to the component name.

If this could be the case, is there any way to ensure the minimizer will not impact the app?

@arifnpm,

Webpack compiles all files into the single bundle file. All schema files are in the src/app directory, and they are bundled by Webpack too. These files are not JSON, but the source code files that exporting JS objects. That's why components paths are the values in the JS objects fields.

So, if your minimizer is going to mangle the field values in the objects, then it can mangle any source code and not only components paths.

I see, after i try to eject it seems the export name is safe from mangling.
so the reference to that component is fine.

Closing this. and Thanks for the feedback.