⊗tlWpPnBDP 25 of 55 menu

Path to build folder in Webpack

You can set an absolute path to the build folder. This is usually done to ensure that Webpack's advanced features work correctly. Let's set this path.

First, let's import the path module:

import path from 'path';

Now let's specify the path to the assembly folder using the path setting:

export default { entry: [ './src/test1.js', './src/test2.js' ], output: { filename: 'build.js', path: path.resolve('dist'), } };

Specify the path to your build folder.

Change the build folder from dist to another one.

enru