Skip to content

Releases: vuejs-templates/webpack

Webpack-dev-server and Jest

12 Nov 18:34
Compare
Choose a tag to compare

About this Release

This is a pretty big release with important changes in two areas, plus a ton of smaller, but not less important stuff.

  • We switched to Webpack-Dev-Server instead of rolling out own. We initially did this because back then, the Webpack-Dev-Server was missing some stuff like the error-overlay that we wanted to use. Since then, it improved a lot and with the switch to the "official" dev server we get rid of a good chunk of technical debt in this template.

  • We now use Jest as the preferred test-runner for unit tests. We love jest and find that it's much faster easier to work with than the current karma+mocha setup. However, we acknowldge that many users are accustomed with the latter for quite some time and might prefer it still. So it's still an option to pick in the init process.

Things we added

Bides the two big additions, the following new features/functionalities were added:

New /config/index.js options (#975)

  • dev:
    • autoOpenBrowser: Wether to open a new browser tab whenever the dev server starts.
    • useEslint: Wether to use eslint-loader in webpack. Some people might only want to use eslint in their IDE, so the loader can be deactivated here.
    • showEslintErrorsInOverlay: if using eslint-loader, this option allows to switch of the eslint errors in the error overlay shown in the browser. the errors still appear in the console & terminal, but don't break the workflow in the browser anymore.
    • notifyOnErrors: will show OS notifications whenever a build fails. Useful when your builds take some time
    • poll: enables polling mode for webpack's file-change watcher. The default mode doesn't work in some environments, like dropbox folders, Vagrant etc. so switching to polling can fix this.
  • you can now change sourcemap-related options for the dev and prod builds in the config file.

We also restructured that file a bit so it hopefully makes for sense at first sight, and tried to improve comments in the config file to explain some options better.

Other additions

  • We added ModuleConcatenationPlugin to the Production config (#1013, @agnivade)
  • added another CommonsChunkPlugin instance that creates a vendor chunk for modules shared between codesplit chunks.

Things we improved

Other Improvements

  • UglifyJS Plugin now runs in parellel mode, as recommended, so build times should improve ( #941, @Gingernaut)
  • .gitignoreand.eslintignore` files received some new entries and improvements (#953, @exarus)
  • dev.env.js and prod.env.js are now directly imported into the respective webpack configs instead of taking an unnecessary detour through /config/index.js.
  • Improved vendor chunk config to be more in line with webpack docs' best practices

Things we fixed

  • Webpack comments for naming import() chunks now works correctly (#997, @SidKwok)
  • Only add instanbul to babel config if Unit test option was chosen during project setup. (#785, @huguangju)
  • Browser targets for the babel-preset-env existed in both .babelrc and package.json - now removed from the former because other packages (i.e. style-lint) also read the package.json field. (#1004, @anubhav7495 )
  • babelrc now only includes the istanbul plugin when the karma+mocha setup was chosen during init. Fixes a missing dependency error. (#785, @huguangju)
  • autoprefixer (or more precisely - postcss) is not also applied to styles in .css files (and .scss etc.) , not only styles in .vuefiles. (#890, @yibuyisheng)
  • fixed a sourcemap bug concerning css sourcemaps (#1014, @LLawlight)
  • a couple of typos, grammar and broken links in the docs.

Things we removed

  • dev-server.js& dev-client.js - replaced by webpack-dev-server.

Other Notes

  • Due to the changes of #975, the webpack.dev.config now returns a Promise resolving to the config object.

Maintenance

  • Bumped a couple of dependencies

Final Words

Thanks for the continuinf efforts of all contributors to improve this template!

We forgot some stuff...

16 Oct 11:21
Compare
Choose a tag to compare

namely bumping vue-loader and vue-template compiler. Fixed now.

Bumping Vue+VueRouter versions, some minor fixes

16 Oct 08:21
Compare
Choose a tag to compare

Things we fixed

  • Revert Change to dev-client.js that broke hot reloading in older browsers
  • dev-server.js: Fix a const that should be a let @schettino72 (#965)

Things we improved

  • Converted Hello-World compüonent in App.vue to PascalCase to match the new style guide. @hootlex (#951)
  • bumped Versions for Vue (2.5.2) and Vue-Router (3.0.1) @Ffloriel (#984)

Some small fixes

08 Oct 09:39
Compare
Choose a tag to compare

Things we fixed

  • Latest eslint-config-airbnb-base requires eslint4.*, but this template uses eslint 3.*, so the config is downgraded to a version compatible with eslint 3.*. We will soon upgrade to eslint 4.*, but have to run some tests first.
  • fix a typo in config/index.js

Things we cleaned up

  • Fix README explanation about devserver port 8080 to reflect port detection introduced in 1.1.0

First documented release

07 Oct 17:22
Compare
Choose a tag to compare

Some word about this release

Up until this point, we didn't release distinct versions of this template. Rather, whenever we added something or got a PR, we just merged into master, so it was available immediatly.

This had several downsides, like risking to break the master with merged PRs that were not throughly tested, and problems when helping people without knowing which version of the template they were on.

From now on, we will merge all changes into develop, and merge chunks of changes into master, which we will tag as distinct releases and will document changes in the github releae description.

Things we added

  • Webpack 3 - Yes, it took us quite a while to make this update. We experiences problems with HMR with webpack 3 and it took us a while to find out where that problem came from and what to do about it. Now that we could clear that up, we could make the jump. thank everyone in #751 who helped out in identifying issues and testing.
  • Dynamic Port alloction - Previously, the dev-server started on a fixed port. This created problems when people had projects running in parallel. Now it chooses he next free port if the default one is taken. (#913, @adi518)
  • Change Port from ENV - You can now dynamically change the devserver's port with the PORT env variable. (#880, @iboldurev)
  • The template repository now has an MIT license (#942, @danjou-a )

Things we fixed

no bugfixes in this release

Things we cleaned up (Chores, refactors)

  • Bumping various dependencies (e9ed4c5, @yyx990803)
  • Small documentation corrections (#927)
  • Added .vscode to .gitignore (#845, @)
  • @robwierzbowski cleaned up a bunch of inconsistencies, thanks! (#897, #912, #893)
  • all config/webpack-releated files now use const/let instead of var, since the required minimum node version supports those anyway (#801, @sudo-suhas).

Things we are planning / working on

  • Introducing Jest as the new default Unit testing framework (#824). We will keep karma/mocha around for a while, but it will be deprecated with the next release and removed in a later version.
  • Various small fixes: We have a couple of PRs that intend to fix a couple of small issues. We will review and test them.