question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TODO] Update template to Webpack 2

See original GitHub issue

Now that webpack 2.2 has been officially release, I think it’s time we update this template to this version.

I will track the progress in this issue.

(Bookmark: Migration guide https://webpack.js.org/guides/migrating/)

Additional Points from the top of my head:

  • refactor resolve.root, resolve.fallback, resolve.modulesDirectories to `resolve.modules
  • dito for resolveLoader
  • remove empty string in resolve.extensions
  • rename module.loaders to module.rules
  • rename all loaders to their long names (babel -> babel-loader )
  • switch loader chains to use: [...]
  • remove json loader (active by default)
  • refactor pre-Loaders into loaders.
  • remoce OccurrenceOrderPlugin (active by default now)
  • css utility function for vue-loader options have to be refactored to work with webpack 2 new rules option syntax.
  • Add sourcemap: true to UglifyJSPlugin in prod config, remove warnings (auto false now)

Other dependencies to update

  • ExtractTextPlugin (also adjust syntax)
  • webpack-dev-middleware

Other necessary changes:

  • modules: false in .babelrc to let webpack handle ES6 modules syntax

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:25
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
servermachinecommented, Jan 26, 2017

I have the same, blank screen. The manifest, app and vendor.js are included, but no chunks are requested and no injection occurs. I also have no css generated from .vue files.

2reactions
yuu2lee4commented, Feb 4, 2017

It seemed like master already upgrade to webpack 2.2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

To v2 or v3 from v1 - webpack
ExtractTextWebpackPlugin - breaking change. ExtractTextPlugin requires version 2 to work with webpack 2. npm install --save-dev extract-text-webpack-plugin.
Read more >
Getting Started with webpack - Insightful Software - Envy Labs
The syntax for 3.x is identical to 2.x, which means this article is still up-to-date (if I missed something, please comment!). The version...
Read more >
How to create multiple output paths in Webpack config
Webpack does support multiple output paths. Set the output paths as the entry key. And use the name as output template. webpack config:...
Read more >
A Beginner's Guide to Webpack - SitePoint
Mode: typically, when we develop our application we work with two types of source code — one for the development build and one...
Read more >
A mostly complete guide to webpack 5 (2020)
This means I have no obligation to keep them constantly updated to the ... webpack has two modes of operations: development and production....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found