Currently, I am in the process of learning how to use Parcel for bundling purposes. I have set up a index.html file that is connected with index.js. Surprisingly, everything works perfectly fine when I access it via localhost:1234
using Parcel. However, when I navigate to the dist folder and open the index.html, the application does not function as expected.
It appears that the issue stems from my usage of imports within my index.js file.
Here is an excerpt from my package.json file -
{
"name": "reddit",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.10.4",
"cssnano": "^4.1.10"
},
"description": ""
}
View my index.html code for script connection here
Check out the list of all folders in my project
I am importing redditapi.js in index.js (refer to the image containing the list of all folders)
Encountering errors when trying to use the app on index.html located in the dist folder