Skip to content

Migrate to webpack v4 #502

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

Merged
merged 15 commits into from
Nov 28, 2019
Merged

Migrate to webpack v4 #502

merged 15 commits into from
Nov 28, 2019

Conversation

ashmaroli
Copy link
Member

webpack 5 is around the corner.
Migrating to v4 now will ease the future migration.

@ashmaroli
Copy link
Member Author

@mertkahyaoglu I just can't seem to get ESLint to accept properties in ES6 classes.
Bypassing ESLint generates a working bundle.js. So webpack seems to be working fine.

Any suggestions..?

@lexoyo
Copy link
Collaborator

lexoyo commented Oct 3, 2019

@mertkahyaoglu I just can't seem to get ESLint to accept properties in ES6 classes.
Bypassing ESLint generates a working bundle.js. So webpack seems to be working fine.

Any suggestions..?

Hi @mertkahyaoglu
👍 to migrate now
ES6 is without class attributes which came with ES7 so maybe this is the issue
I tried setting "ecmaVersion": 8, in package.json (in eslintConfig.parserOptions) but it still throws the error. So maybe we should use es2017 in env as explained in eslint docs, but it is not recognized. Is this because of our version of eslint? (I'm working with your branch/fork)

@ashmaroli
Copy link
Member Author

@lexoyo I suspect the issue is probably with eslint-scope which is a dependency of webpack v4..

@mertkahyaoglu
Copy link
Member

I couldn't have a chance to look into this. Gonna investigate the issue today. We can try bumping eslint to be compatible with our configuration. Currently its version is 6.5.1 and we are using a very old one. Maybe its the issue.

@ashmaroli
Copy link
Member Author

Thank you for looking into this, @lexoyo and @mertkahyaoglu. You guys were correct. The outdated versions of eslint were indeed the problem.
I've have now bumped their versions to the latest release (which requires at least Node v8).

There are some warnings and errors in the Travis log, but the production build completes successfully locally..
Will take a further look into that matter..

@ashmaroli
Copy link
Member Author

Flushed the build caches at Travis to induce creation of fresh bindings for node-sass in NodeJS@v8

Remaining TODO:

  • Reduce log output from webpack

@mertkahyaoglu

This comment has been minimized.

@ashmaroli

This comment has been minimized.

@ashmaroli
Copy link
Member Author

@mertkahyaoglu I don't know what more is left to reduce the log output from webpack in dev mode.
IMO, shipping this before upgrading React and its associates would be better.. whatsay?

@ashmaroli
Copy link
Member Author

Bundle size comparison (across AppVeyor builds):

filename master webpack-4
bundle.js.map 12.84MB 7.33MB
bundle.js 2.46MB 2.44MB
styles.css.map 189.96KB 115.11KB
styles.css 89.13KB 89.09KB

@ashmaroli ashmaroli merged commit cbc5ecc into jekyll:master Nov 28, 2019
@ashmaroli ashmaroli deleted the webpack-4 branch November 28, 2019 11:52
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.

3 participants