Prepare webpack configuration for project structure provided here: https://github.com/mikeqcp/webpack-exercise-apptension. Prepare config for dev and prod environments.
You can use webpack 2 if you want.
Configuration should include:
- support for es6 (use babel)
- correctly import all modules used in the app
- compile scss styles
- extract all css styles to a separate file
- should create 2 bundles - one for main webpage, one for unsupported page
- common.js module should be shared between both bundles
- filenames should be hashed
- support for browser-specific prefixes
- automatically create html file during build
- generate spritesheets from images in sprites directory + use one of generated icons in project
- enviroment specific configs (env/local/conf.js & env/prod/conf.js) should be served when importing config module
- PRODUCTION global variable should be defined, and set to true only for production (used in modules/log.js)
- development enviromnent should support hot-reloading
Write a plugin or loader. Include an example of it's usage.
Bonus points:
- If is doesn't already exist
- If it is usefull in real life
- For variety and quality of used API hooks/capabilities