środa, 9 listopada 2022

Nativescript: Assets Folder Not Including html,js, css files

In default options WebpackPlugin copy Images and fonts folder. 
If You need to copy for example assets folder with js, html etc. for webView You mast update
 
CopyWebpackPlugin in your webpack.config.js to include the asset folder

for 6.x version of nativescript |
new CopyWebpackPlugin([
 { from: "fonts/**" },
 { from: "**/*.jpg" },
 { from: "**/*.png" },
 { from: "assets/**" }, // Add your asset folder path like this
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),

for 7,8 version

webpack.Utils.addCopyRule('assets/**')


Brak komentarzy:

Prześlij komentarz