Can alias of webpack be configured like require?

  node.js, question

I have been using require.js all the time before. I have just come into contact with WebPack recently. Can alias of WebPack be configured without using webpack.config.js? Configure alias as require

The following is the webpack.config.js configuration.

Entry: {'Please enter the code'
 main: 'index.js'
 },
 output: {
 path: 'build'
 filename: '[name].js'
 },
 resolve: {
 root: 'modules'
 alias: {
 'mod/slider': '/path/mods/mod/slider/0.0.5',
 'mod/footer': '/path/mods/mod/footer/0.0.2',
 'mod/slider/0.0.3': '/path/mods/mod/slider/0.0.3',
 'mod/header': '/path/mods/mod/header/0.0.1',
 'mod/slider/0.0.1': '/path/mods/mod/slider/0.0.1'
 bracket
 bracket

Require.js is configured in the;

baseUrl: "/assets/script",
 paths: {
 "userinfo": "room/mod/userinfo",
 "client": "room/mod/client",
 "popTips":"room/mod/popTips",
 "sidler": "room/mod/sidler",
 "event": "room/mod/event",
 bracket

Config.jsneri is to assemble a js Object, so you can do this:

var _ = require('lodash');
 var config = _.extend({
 /* your above entry, output, etc */
 }, {
 resolve: {
 root: '',
 Alias: require(/* your alise configuration */)
 bracket
 });
 module.exports = config