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

Use Babel 7 & Webpack3 (via blocks) #1334

Merged

Conversation

zcei
Copy link
Contributor

@zcei zcei commented Feb 5, 2018

Umbrella: #1333

  • Gets Babel into play, so that ESM is working
  • Upgrades Webpack to v3 and uses an abstraction layer that simplifies config creation.

@Khaledgarbaya Khaledgarbaya added this to the v1.0.0 milestone Feb 5, 2018
@zcei zcei force-pushed the release/1.0.0-babel-webpack branch from 0b57e41 to 006d429 Compare February 5, 2018 12:02
@Khaledgarbaya Khaledgarbaya mentioned this pull request Feb 5, 2018
48 tasks
@zcei zcei force-pushed the release/1.0.0-babel-webpack branch from bef8397 to bd1d386 Compare February 5, 2018 13:04
@zcei
Copy link
Contributor Author

zcei commented Feb 5, 2018

The PR Karma with Webpack config (see #1333 for details on order of PRs) will fix the test setup. Currently the provided config is incompatible with Webpack, but for overview purposes the PR for changing Karma is split up to its own PR

@montogeek
Copy link

Why webpack-block is used?

@zcei
Copy link
Contributor Author

zcei commented Feb 5, 2018

Webpack's configuration object is a low-level format, that nearly no-one grasps fully. Therefore it's error prone and not easily to relate single lines to the functionality it should enable.

Therefore a composable higher-level abstraction was chosen, that makes obvious what shall be achieved, which can get expanded to the verbose lower-level syntax.

@montogeek
Copy link

I am worried that new contributors would need to learn an abstraction to make a new change, on the hand, since this is related on how the library is build and distributed I don't think it would change a lot.
Cool abstraction!

@zcei
Copy link
Contributor Author

zcei commented Feb 5, 2018

Indeed. But given the fact what it takes to learn configuring Webpack properly (also in its different versions) and how often there's a need to change this config later (very few) the readability was my main driver.
Even when you don't know the library, reading it gives you a pretty clear idea on what's going on (of course that's only my opinion 🙂 )

@axe312ger
Copy link
Contributor

Yep I agree here:

  • the readability is definitely better as a common webpack config.
  • the values itself do not really differ, doing changes is basically no real efford
  • we will probably not change these settings at all in the close future (webpack 4 maybe by removing some stuff which is hopefully then part of the config defaults)

Copy link
Collaborator

@Khaledgarbaya Khaledgarbaya left a comment

Choose a reason for hiding this comment

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

two small comments

"url-search-params": "^0.6.1",
"typescript": "^2.0.3"
"webpack": "^3.10.0",
"webpack-dev-server": "^1.16.5"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was just wrongly sorted in the package.json beforehand. The dev dependency can be removed in the Karma branch, as until then the karma config has a dependency on the Webpack dev server

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes to make the tests run in this PR, will get removed later on

},
"browser": {
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
},
"typings": "./index.d.ts",
"dependencies": {
"follow-redirects": "^1.2.5",
"is-buffer": "^1.1.5"
"is-buffer": "^1.1.5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see this used here, or was it there before ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just the comma, as pkginfo was added 😂

Copy link
Contributor

Choose a reason for hiding this comment

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

In the utils for now, later on we might get rid of it when moving to lodash

Copy link
Collaborator

@Khaledgarbaya Khaledgarbaya left a comment

Choose a reason for hiding this comment

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

LGTM

@Khaledgarbaya Khaledgarbaya merged commit 3cf728a into axios:release/1.0.0 Feb 5, 2018
@Khaledgarbaya Khaledgarbaya deleted the release/1.0.0-babel-webpack branch February 5, 2018 15:59
@Khaledgarbaya Khaledgarbaya added this to To Do in 1.0.0 via automation Feb 9, 2018
@Khaledgarbaya Khaledgarbaya moved this from To Do to Done in 1.0.0 Feb 9, 2018
@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
1.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants