All Projects → styopdev → Webpack Interview Questions

styopdev / Webpack Interview Questions

Webpack questions/answers you can use to prepare for interviews or test your knowledge.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webpack Interview Questions

Ykit
基于 Webpack 的灵活快速的打包工具,帮助稳定高效构建现代 JavaScript 应用。
Stars: ✭ 375 (+135.85%)
Mutual labels:  webpack, build-tool
Sku
Front-end development toolkit
Stars: ✭ 403 (+153.46%)
Mutual labels:  webpack, build-tool
Webpack
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Stars: ✭ 60,034 (+37657.23%)
Mutual labels:  webpack, build-tool
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (+7.55%)
Mutual labels:  webpack, build-tool
Jarvis
A very intelligent browser based Webpack dashboard
Stars: ✭ 5,432 (+3316.35%)
Mutual labels:  webpack, build-tool
Happypack
Happiness in the form of faster webpack build times.
Stars: ✭ 4,232 (+2561.64%)
Mutual labels:  webpack, build-tool
Neutrino
Create and build modern JavaScript projects with zero initial configuration.
Stars: ✭ 3,844 (+2317.61%)
Mutual labels:  webpack, build-tool
How To Setup Webpack 2
🔧 ⚙ Tutorial to setup webpack 2 from scratch.
Stars: ✭ 107 (-32.7%)
Mutual labels:  webpack, build-tool
Poi
⚡A zero-config bundler for JavaScript applications.
Stars: ✭ 5,291 (+3227.67%)
Mutual labels:  webpack, build-tool
Elf
灵活可扩展的 HTML5 构建工具
Stars: ✭ 479 (+201.26%)
Mutual labels:  webpack, build-tool
Buildpipeline
AWS-powered serverless build, test and deploy pipeline ft. multiple environments
Stars: ✭ 105 (-33.96%)
Mutual labels:  webpack, build-tool
Create Elm App
🍃 Create Elm apps with zero configuration
Stars: ✭ 1,650 (+937.74%)
Mutual labels:  webpack, build-tool
Webpack Encore
A simple but powerful API for processing & compiling assets built around Webpack
Stars: ✭ 1,975 (+1142.14%)
Mutual labels:  webpack
Foy
A simple, light-weight and modern task runner for general purpose.
Stars: ✭ 157 (-1.26%)
Mutual labels:  build-tool
Webpack Fast Refresh
React Fast Refresh plugin and loader for webpack
Stars: ✭ 155 (-2.52%)
Mutual labels:  webpack
React Webpack 5 Tailwind 2
React 17 Boilerplate with Webpack 5, Tailwind 2, using babel, SASS/PostCSS, HMR, dotenv and an optimized production build
Stars: ✭ 155 (-2.52%)
Mutual labels:  webpack
Hops
Universal Development Environment
Stars: ✭ 158 (-0.63%)
Mutual labels:  webpack
Deventy
A minimal 11ty starting point for building static websites with modern tools.
Stars: ✭ 157 (-1.26%)
Mutual labels:  webpack
Webpackstudydemo
Webpack learning journal and awesome resources.
Stars: ✭ 154 (-3.14%)
Mutual labels:  webpack
Goa
基于Beego开发的问答系统
Stars: ✭ 154 (-3.14%)
Mutual labels:  webpack

Webpack interview questions

View version with answers

Big thanks to TheLarkInn, raybooysen and johannesMatevosyan for contribution.

Table of Contents

Concepts

  • What is webpack?
  • What is the main difference between webpack and other build tools like gulp or grunt?
  • What is a bundle in webpack?
  • In which environment does webpack work?
  • What is an entry point?
  • What is a dependency graph and how does webpack build it?
  • Which modules design patterns webpack supports out of the box?

Config file

  • What is the format of webpack's config file?
  • Is it possible to have multiple entry points in a single webpack configuration file?
  • Is it possible to define multiple configurations for different environments?
  • How can we generate webpack config file automatically?

Loaders

  • What is a loader in webpack?
  • Where should loaders be defined?
  • What is the difference between a rule and a loader?
  • Explain this code
    {
      test: /\.scss$/,
      loaders: ['style-loader', 'css-loader?sourceMap', 'sass-loader?sourceMap', 'postcss-loader'],
      exclude: /node_modules/
    }
    
  • Do loaders work in a synchronous or an asynchronous way?
  • Is it possible to use multiple loaders in the rules single object?
  • Name loaders that you think are very important and helpful.

Plugins

  • Describe a plugin in webpack.
  • What is the difference between a loader and a plugin?
  • What is the advantage of CompressionPlugin?
  • How can you move some data (e.g css code) from a bundle to a separate file in webpack?
  • Name some plugins you think are important and helpful.
  • Is it possible to write your own plugin?

Development

  • What are some advantages of using webpack-dev-server over simple http server or nginx?
  • On which platform is webpack-dev-server developed?
  • What is Hot-Modules-Replacement?
  • Does it make sense to use Hot-Modules-Replacement in production environment?
  • How to enable source maps in webpack bundles?
  • How to automatically build and update bundles in the browser after a change in source code?
  • What is parallel-webpack and how does it affect webpack's build process?

Optimization

  • Briefly describe long-term caching and how to achieve it using webpack?

  • What is difference between

       ...
       output: {
        filename: "[name].[hash].js"
       }
       ...
    

    and

       ...
        output: {
         filename: "[name].[chunkhash].js"
        }
        ...
    
  • Describe the CommonsChunkPlugin.

  • Explain this code

   new webpack.optimize.CommonsChunkPlugin({
     name: 'common',
     filename: 'common.js',
     chunks: ['home', 'dashboard']
   })
  • Which built-in plugin should be used for code minification?
  • Explain this code
   new webpack.ContextReplacementPlugin(
     /moment[\/\\]locale/,
     /(en-gb|en-us)\.js/
   )
  • How to remove unused selectors from css using webpack?
  • How to achieve lazy loading in webpack?
  • Why is OccurenceOrderPlugin part of webpack optimization? What it has to do with module ids and topological sorting?
  • What analysis tools do you use for webpack bundle's inspection?

Migration

  • Describe the LoaderOptionsPlugin.
  • Do you need to include OccurenceOrderPlugin in the plugins section when use webpack 2/3?
  • Which version(s) of webpack support es6 modules out the box?
  • Which version(s) of webpack support json-loader out the box?
  • Which version(s) of webpack support code splitting?

Advanced questions

  • Describe the webpack runtime and manifest.
  • Is it possible to use other languages (except javascript) for the webpack config file?
  • Is it possible to have different configuration files for different environments?
  • Describe the tree shaking mechanism.
  • What is the difference between tree shaking and dead code elimination.
  • Describe scope hoisting in webpack 3.
  • What is Tapable and how does it relate to webpack plugins?

Internal API Questions (very advanced)

  • What is the difference between Compiler and Watching classes?
  • Describe the purpose of Compiler
  • Describe the purpose of Compililation
  • Describe DependenciesBlock class. Why is it so important?
  • Describe the relationship between the Parser, Dependency, Dependency Factory, and Dependency Templates
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].