There are effectively 2 paths you can take to achieve this...
The first option is to transform the DWG files to create a new rendition in something that the Alfresco web previewers can already display (such as PDF). Doing some quick Googling reveals various online tools that will do this so there should be something that you could theoretically use to create a new transformer.
The second option is to create a new plugin for the client-side previewers that are used within browsers. There do appear to be various browser plugins that will support the viewing of DWG files, so again this should be possibly.
Those are the two ways in which you would follow to solve this problem... however, you'd need to do the research into what technologies are available for you to use (either on the server or in the client). This is domain-specific knowledge that is unlikely to be found in the Alfresco forums... have you tried asking a similar question in the Autodesk forums?
Regarding the first option mentioned by Dave Draper, DWG files may be big files for transforming to PDF continuously in the server (performance). And sometimes the tool or command line tool for transforming is not as accurate as we would like.
Basically you need some customization for this preview, usually based in a custom transformer from CAD format to PDF format, using an external program (command line). For example:
Soft29 blog: Alfresco CAD (dxf, dwg) preview support
In github, I found two addons for doing this preview:
GitHub - loftuxab/alfresco-vector-transformations-module: Adding support for vector file transformations in Alfresco inc…
GitHub - verve111/alfresco_cad_support: Alfresco CAD (dxf, dwg) preview support
And also, I know about an EDM module by Formtek, but this is a more complete integration with AutoCAD, than a previewer.
Engineering Data Management Module for Alfresco | formtek
Retrieving data ...