# wpvr/8.5.77/webpack.config.js

WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress, version 8.5.77. 28 lines.

- Page: https://pluginprobe.com/plugins/wpvr/8.5.77/code/webpack.config.js
- Raw: https://pluginprobe.com/plugins/wpvr/8.5.77/raw/webpack.config.js
- Modified: 2026-07-30T04:45:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpvr/8.5.77/code/webpack.config.js#L10-L20`.

```javascript
// node module that let's us do file system stuffs...
const path = require('path');

// Webpack expects an exported object with all the configurations, so we export an object here
module.exports = {
    entry: './src/index.js', // Where to find our main js
    output: {
        // where we want our built file to go to and be named
        // I name it index.build.js so I keep index files separate
        filename: 'index.build.js',
        // we're going to put our built file in a './build/' folder
        path: path.resolve(__dirname, 'build')
    }, 
    module: {
        rules: [
            { 
                // basically tells webpack to use babel with the correct presets
                test: /\.js$/,
                loader: 'babel-loader',
                query: {
                    presets: ['@babel/preset-env', '@babel/preset-react']
                }
            }
        ]
    },
    // Webpack yells at you if you don't choose a mode...
    mode: 'development'
}
```
