Closed phatakrajan closed 5 years ago
@phatakrajan try to explicitly include the static HTML file as done here
In your case
new CopyWebpackPlugin([
{ from: "www/index.html" }, // Add this line
{ from: "fonts/**" },
{ from: "**/*.jpg" },
{ from: "**/*.png" },
]
@NickIliev I had tried this. This does not resolve the issue. I tried loading 3 resources independently as well e.g. { from: "www/index.html" }, // Add this line { from: "www/index.js" }, // Add this line { from: "www/index.css" }, // Add this line
index.js still don't show up. I verified the code to check if it got bundled into bundle.js. However I don't see code there as well. Can you please help?
@phatakrajan I've just noticed that you have a different structure with src
as a root folder. So in your case, it should be:
{ from: "app/www/index.html" },
@NickIliev Thanks. It's working. As you pointed out, it was issue w.r.t. paths only
Environment Android and iOS
package.json
webpack.config.js
Describe the bug Static HTMLs are not getting loaded when webpack is used. Issue is pretty similar to the issue mentioned here
My Code structure is
|-src |----app |--------www |------------index.css |------------index.html |------------index.js
My Index.html looks something like this
i checked all bundles which are getting generated but did not find the code from index.js being available. What is that need to be added to webpack.config.js file so that www folder need to be added to my bundle just like the assets?