aurelia / loader-webpack

An implementation of Aurelia's loader interface to enable webpack.
MIT License
26 stars 10 forks source link

Webpack log size problem #38

Closed adriatic closed 6 years ago

adriatic commented 6 years ago

I'm submitting a bug report

Please tell us about your environment:

I am not sure what webpack version or even tool itself am I using. The README.md instructions state:

This will install all required dependencies, including a local version of Webpack that is going to build and bundle the app. There is no need to install Webpack globally

Also, the devDependencies section of package.json shows

"@easy-webpack/config-aurelia": "^2.2.2",
"@easy-webpack/config-babel": "^4.0.0",
"@easy-webpack/config-common-chunks-simple": "^2.0.3",
"@easy-webpack/config-copy-files": "^1.1.2",
"@easy-webpack/config-css": "^4.0.0",
"@easy-webpack/config-env-development": "^2.1.5",
"@easy-webpack/config-env-production": "^3.0.0",
"@easy-webpack/config-external-source-maps": "^3.1.0",
"@easy-webpack/config-fonts-and-images": "^2.1.0",
"@easy-webpack/config-generate-index-html": "^2.1.1",
"@easy-webpack/config-global-bluebird": "^2.1.0",
"@easy-webpack/config-global-jquery": "^2.1.0",
"@easy-webpack/config-global-regenerator": "^1.2.2",
"@easy-webpack/config-html": "^3.1.0",
"@easy-webpack/config-json": "^3.1.0",
"@easy-webpack/config-test-coverage-istanbul": "^3.2.0",
"@easy-webpack/config-uglify": "^2.2.3",
"@easy-webpack/core": "^2.0.0",

Current behavior: Using the esnext-webpack skeleton, the command npm start results with well over thousand lines long output on the cmd.exe

Expected/desired behavior:

I am writing a set of tutorials and know that my readers will ask me about this behavior right away

jods4 commented 6 years ago

We're in the process of replacing the old 1.x Aurelia webpack plugin with a new 2.0 release currently in Release Candidate form. If you're writing tutorials, you really don't want to be using 1.x anymore as 2.0 is a complete rewrite meant to be more flexible and easier to use. More importantly, 2.0 is not backward compatible with a 1.x configuration.

Given all the @easy-webpack stuff I'm tempted to think you're using 1.x plugins.

There's no docs in the hub for now, but some background information on 2.0 is in its wiki: https://github.com/aurelia/webpack-plugin/wiki

New skeletons are available, just be aware that they don't reference the latest RC: https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-esnext-webpack

And some barebones, minimal examples can be found in my account: https://github.com/jods4/aurelia-webpack-build/

adriatic commented 6 years ago

Thanks, @jods4 - more than great feedback. After discussing this situation pretty extensively (from the high level standpoint) with @EisenbergEffect, your more detailed comment will allow me to create the "alpha" versions of tutorial samples which target aurelia community developers using aurelia kendoui bridge plugin.

The current set of the tutorial samples are based on original skeletons ver 1.1.2, so I could appreciate your advice on how to proceed from this point onwards:

  1. Rewrite the webpack targeting subset of my tutorial samples, using "your webpack" samples as the basis

  2. Rewrite all of my tutorial samples using the current master as the basis.

Also, please be aware of my work on cli-based-skeletons which I initiated with the intent to help @jeroenvinke at the time he worked on cli last, and the now generally accepted idea to "teach" cli to be able to generate all today's skeleton was not generally accepted. Since Jeroen is on "college hiatus", it may be worthwhile to point out to this work - and I would certainly appreciate some feedback to that. The documents describing these skeletons exist here

jods4 commented 6 years ago

@adriatic My demos and the new skeletons should be similar when it comes to core Webpack features and both can be an inspiration. Just keep in mind that they don't have the same purpose or goal.

Skeletons are full featured setups that intent to include development config, production build, end-to-end testing and more. They have lots of dependencies on 3rd party libs and tie everything together in a large config. Obviously, they are opiniated and some choices were made that may not be everyone's.

My demos are minimal examples that demonstrate one specific aspect of the webpack plugin. They show how to get something working with as little code as possible and illustrate configuration for some specific use cases. I think they are a great "getting started" or learning tool, probably a little lightweight when it comes to building a large-scale app. None of them include automated tests for example. Only one of them has minification. And so on.

adriatic commented 6 years ago

Thanks, @jods4 - based on your explanation, what you have is perfectly fitting my needs. So, I will use is here and here, writing the same caveats you just stated yourself.

If you care to see what I will do with them, I will share my experience here

jods4 commented 6 years ago

I'm glad it helped. Shall we close this issue then?

adriatic commented 6 years ago

It's really bad that GitHub does not create email notifications about added comments to any given thread 😞 . So, with apologies for being late, let's close this issue.

I would also like to share with you my success in using this new Webpack plugin in my Aurelia CLI Adventures which is my attempt to peek in the near future when Aurelia CLI will be able to generate all Navigation Skeletons from scratch (by describing the process of hand-assembling these skeletons).