PHP Classes

File: webpack.config.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Maniruzzaman WordPress Frontend Editor   webpack.config.js   Download  
File: webpack.config.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Maniruzzaman WordPress Frontend Editor
WordPress plugin for visual front-end development
Author: By
Last change:
Date: 1 year ago
Size: 785 bytes
 

Contents

Class file image Download
const defaults = require('@wordpress/scripts/config/webpack.config'); const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/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, entry: { ...getWebpackEntryPoints(), // For blocks. index: './src/index.tsx', // For admin scripts. }, };