How to minimize the size of webpack’s bundle?

According to your comments you are using material-ui and react-bootstrap. Those dependencies are bundled by webpack along with your react and react-dom packages. Any time you require or import a package it is bundled as part of your bundle file. And here it comes my guess. You are probably importing the react-bootstrap and material-ui components … Read more

Avoiding relative paths in Angular CLI

Per this comment, you can add your application source via paths in tsconfig.json: { “compilerOptions”: { …, “baseUrl”: “.”, “paths”: { …, “@app/*”: [“app/*”], “@components/*”: [“components/*”] } } } Then you can import absolutely from app/ or components/ instead of relative to the current file: import {TextInputConfiguration} from “@components/configurations”; Note: baseUrl must be specified if … Read more

Webpack: Bundle.js – Uncaught ReferenceError: process is not defined

For Webpack 5, you can reference process/browser from the appropriate plugins part of webpack.config.js: // webpack needs to be explicitly required const webpack = require(‘webpack’) // import webpack from ‘webpack’ // (if you’re using ESM) module.exports = { /* … rest of the config here … */ plugins: [ // fix “process is not defined” … Read more

How to run Vue.js dev serve with https?

In the latest vuejs (as of May 7, 2018), you need to add a “vue.config.js” in the project root directory: vue.config.js: module.exports = { devServer: { open: process.platform === ‘darwin’, host: ‘0.0.0.0’, port: 8085, // CHANGE YOUR PORT HERE! https: true, hotOnly: false, }, } In this file, set the value: https: true

Webpack-dev-server compiles files but does not refresh or make compiled javascript available to browser

Two things were causing my problems here: module.exports = { entry: ‘./src/index.js’, output: { // For some reason, the `__dirname` was not evaluating and `/public` was // trying to write files to a `public` folder at the root of my HD. path: __dirname + ‘/public’, // Public path refers to the location from the _browser’s_ … Read more