Skip to content

Commit

Permalink
feat(expo): move svg to inline for starter app (#14068)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Jan 3, 2023
1 parent b19eb6c commit cec625e
Show file tree
Hide file tree
Showing 37 changed files with 450 additions and 175 deletions.
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/bin/create-nx-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const presetOptions: { name: Preset; message: string }[] = [
{
name: Preset.ReactNative,
message:
'react-native [a workspace with a single React Native application]',
'react-native [a monorepo with a single React Native application]',
},
];

Expand Down
1 change: 0 additions & 1 deletion packages/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@nrwl/react": "file:../react",
"@nrwl/webpack": "file:../webpack",
"@nrwl/workspace": "file:../workspace",
"@svgr/webpack": "^6.1.2",
"chalk": "^4.1.0",
"enhanced-resolve": "^5.8.3",
"fs-extra": "^10.1.0",
Expand Down
58 changes: 0 additions & 58 deletions packages/expo/plugins/with-nx-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,64 +25,6 @@ export async function withNxWebpack(config) {
},
},
});
// svg rule from https://github.com/kristerkari/react-native-svg-transformer/issues/135#issuecomment-1008310514
rules.unshift({
test: /\.svg$/,
exclude: /node_modules/,
use: [
{
loader: require.resolve('@svgr/webpack'),
options: {
svgoConfig: {
plugins: {
cleanupAttrs: true,
cleanupEnableBackground: true,
cleanupIDs: true,
cleanupListOfValues: true,
cleanupNumericValues: true,
collapseGroups: true,
convertEllipseToCircle: true,
convertPathData: true,
convertShapeToPath: true,
convertStyleToAttrs: true,
convertTransform: true,
inlineStyles: true,
mergePaths: true,
minifyStyles: true,
moveElemsAttrsToGroup: true,
moveGroupAttrsToElems: true,
removeComments: true,
removeDesc: true,
removeDimensions: false,
removeDoctype: true,
removeEditorsNSData: true,
removeEmptyAttrs: true,
removeEmptyContainers: true,
removeEmptyText: true,
removeHiddenElems: true,
removeMetadata: true,
removeNonInheritableGroupAttrs: true,
removeRasterImages: true,
removeScriptElement: false,
removeStyleElement: false,
removeTitle: true,
removeUnknownsAndDefaults: true,
removeUnusedNS: true,
removeUselessDefs: true,
removeUselessStrokeAndFill: true,
removeViewBox: false,
removeXMLNS: true,
removeXMLProcInst: true,
reusePaths: true,
sortAttrs: true,
sortDefsChildren: true,
convertColors: false,
},
},
},
},
],
});
}

const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
Expand Down
Binary file not shown.
11 changes: 0 additions & 11 deletions packages/expo/src/generators/application/files/assets/star.svg

This file was deleted.

Loading

0 comments on commit cec625e

Please sign in to comment.