PHP Classes

File: webpack/webpack.config.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WP Vue Kit Plugin   webpack/webpack.config.js   Download  
File: webpack/webpack.config.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WP Vue Kit Plugin
Vue.js plugin to build WordPress user interfaces
Author: By
Last change:
Date: 1 year ago
Size: 936 bytes
 

Contents

Class file image Download
/** * External dependencies. */ const path = require("path"); /** * Internal dependencies. */ const loaders = require("./loaders"); const plugins = require("./plugins"); const isDev = (process.env.NODE_ENV = "development"); let config = { entry: { main: path.resolve(__dirname, "../src/main.js") }, devtool: isDev ? "inline-source-map" : false, mode: process.env.NODE_ENV, module: { rules: loaders }, plugins, output: { path: path.resolve(__dirname, "../assets/js"), filename: "[name].js" }, optimization: { minimize: true } }; // Add dev server only for development mode and not for production. if (isDev) { config.devServer = { devMiddleware: { writeToDisk: true }, allowedHosts: "all", host: "localhost", port: 8887, proxy: { "/assets": { pathRewrite: { "^/assets": "" } } } }; } module.exports = config;