I have created a code-sharing projects with Angular 8.30 and Nativescript.
When I run ng serve
, the app builds ok. However with tns run android
The same happened to me and When I try to edit webpack.config.js it works for me just replace the lines
new CopyWebpackPlugin([
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.jpg" } },
{ from: { glob: "**/*.png" } },
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
to be
new CopyWebpackPlugin({
patterns: [
{ from: "fonts/**", globOptions: { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] } },
{ from: "**/*.{jpg,png}", globOptions: { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] } },
]
}, { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
and do not forget to add fonts folder if you do not have one
Actually, this issue is related to version of "@angular-devkit/build-angular".
For me works!