PHP Classes

File: webpack.config.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WordPress React Plugin Kit   webpack.config.js   Download  
File: webpack.config.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WordPress React Plugin Kit
Environment to develop new WordPress plugins
Author: By
Last change:
Date: 1 year ago
Size: 567 bytes
 

Contents

Class file image Download
const defaults = require('@wordpress/scripts/config/webpack.config'); const config = { ...defaults }; // Add server only for development mode and not for production. if ('production' !== process.env.NODE_ENV) { config.devServer = { devMiddleware: { writeToDisk: true, }, allowedHosts: 'all', host: 'localhost', port: 8887, proxy: { '/build': { pathRewrite: { '^/build': '', }, }, }, }; } module.exports = config;