Webpack Entry Points Context

As a rule, project files are located in some folder. In our case, it is src. As a result, we have to specify this folder in all paths:

webpack.config.jsexport default {
  entry: [
    './src/test1.js',
    './src/test2.js'
  ],
};

You can specify the path to the shared project folder using the context command. This will simplify the entry point paths:

webpack.config.jsexport default {
  context: path.resolve('src'),
  entry: [
    './test1.js',
    './test2.js'
  ],
};
Задание 1

Simplify the following paths:

webpack.config.jsexport default {
  entry: [
    './src/test1.js',
    './src/test2.js',
    './src/test3.js',
  ],
};
Задание 2

Simplify the following paths:

webpack.config.jsexport default {
  entry: {
    f1: './src/test1.js',
    f2: './src/test2.js',
    f3: './src/test3.js',
  },
};