i have bought a template, that used F7 v5.1.0 , it has the following folders: [css, fonts, img, js, pages, index.html]
Started a fresh project to understand a little bit more how things work. For the first project i didn’t use webpack, and by simply adding files to the www, worked like a charm.
Now, i can’t find any option to build for production. It seems i need to use webpack
Made a new project this time using webpack, this time i added the folders to src/
When i try: npm run dev , it loads the app.js file, and index.html file only. No CSS, no routes working, no links working , nothing works besides showing index.html text content Not good
I understand that creating a project and then importing files not related is not the best of the ideas, but its all i’ve got.
Should i edit the webpack.config.js? This seems to be a problem with unreachable files.
no need to modofy webpack. split your plain html+css project in components. declare the routes for each page etc. you have refactor your template to use webpack. thats the celanest way in my opinion. also you can just put all the folders like fonts css img in the static folder. then import them.
Thank you for your answer my guy.
So, i have every folder in the right place, everything is divided correctly.
Usually the output from “npm run dev” would have more assets, but it doesn’t seem to find all the assets needed
Built at: 12/10/2020 10:32:04 AM
Asset Size Chunks Chunk Names
./index.html 8.36 KiB [emitted]
js/app.js 401 KiB app [emitted] app
Entrypoint app = js/app.js
Nothing is loaded , for example, i get Failed to load resource: the server responded with a status of 404 (Not Found) for every file referenced from index.html, but funny enough, it loads the ./src/index.html and ./src/js/app.js CORRECLY!
Ok, got it solved, had to remove “static” from:
Thank you! Now lets try F7