Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up webpack for locally run the website #182

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

MeastroZI
Copy link
Contributor

Description:

Implemented webpack configuration for local development and bundling.

Purpose:

To allow the website to run locally and improve the local development environment by configuring webpack for SCSS bundling, import resolution, and output management

Screenshot from 2024-03-15 20-20-49

Screenshot from 2024-03-15 20-21-15

@MeastroZI MeastroZI changed the title Set up webpack for locally run the webvsite Set up webpack for locally run the website Mar 15, 2024
@MeastroZI
Copy link
Contributor Author

@jviotti I am confused about what to do for the failure of "make www"

@jviotti
Copy link
Member

jviotti commented Mar 15, 2024

Its a linter error:

  /home/runner/work/alterschema/alterschema/www/app.js:8:1: Import in body of module; reorder to top. (import/first)

package.json Outdated Show resolved Hide resolved
www/app.js Outdated Show resolved Hide resolved
@MeastroZI
Copy link
Contributor Author

MeastroZI commented Mar 16, 2024

Make www is running fine locally

Screenshot from 2024-03-16 10-26-13

The issue was that, when we run 'make www', as it calls webpack.js which have its own entry point, leading to a conflict with the webpack.config.js file. To address this, I've updated the makefile to directly run the webpack command for building, which handles HTML, JS, and CSS files, while the makefile handles the remaining PNG files. Additionally, I've added the serve command for locally run the website.

but i dont know why it getting error in checks 😢

@MeastroZI
Copy link
Contributor Author

May be error is related to the incompatibility of the some webpack dev dependencies on node 16 ( Version in which CI is run) ?

Copy link
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented on some of the changes that look off. Hopefully that helps, as I'm not a web developer and have very limited Webpack knowledge besides the simple setup I had on this repo

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@MeastroZI MeastroZI force-pushed the master branch 2 times, most recently from c70c513 to 4f73f99 Compare March 19, 2024 12:53
@MeastroZI MeastroZI requested a review from jviotti March 19, 2024 13:07
@MeastroZI
Copy link
Contributor Author

dev_Entry.js is the entry file for webpack.config.dev.js. I did this to avoid conflicts with 'make www' command and ensure that 'make www' remains untouched.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
www/index.html Outdated Show resolved Hide resolved
www/dev_Entry.js Outdated Show resolved Hide resolved
webpack.config.dev.js Outdated Show resolved Hide resolved
@MeastroZI MeastroZI force-pushed the master branch 4 times, most recently from ec685e3 to ee66a70 Compare March 20, 2024 15:36
@MeastroZI
Copy link
Contributor Author

@jviotti, I hope this is okay now. If there are any other changes, please let me know. I learn many good practices from this PR , and I'm really really sorry for this mess !!

@MeastroZI MeastroZI requested a review from jviotti March 20, 2024 15:46
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@jviotti
Copy link
Member

jviotti commented Mar 21, 2024

Any time! Looking better already

Makefile Outdated Show resolved Hide resolved
@jviotti
Copy link
Member

jviotti commented Mar 21, 2024

I left one remaining comment but other than that works great 👍

Signed-off-by: MeastroZI <vinitsharma2480@gmail.com>
Copy link
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@jviotti jviotti merged commit 29e0b0e into sourcemeta:master Mar 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants