Skip to content

Instantly share code, notes, and snippets.

@rvanzon
rvanzon / readme.md
Last active September 9, 2021 17:22
Nuxt.js: reduce the number of chunks

To reduce the number of chunks of your project build with Nuxt.js add the next lines:

  if (!this.dev) {
    config.plugins.push(new webpack.optimize.LimitChunkCountPlugin({
      maxChunks: 3        
    }))
  }

right under extend (config, ctx) { of nuxt.config.js. Then build your project with npm run build. Et voilà, No more than 3 chunks :-)

@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active July 14, 2024 18:27
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install [email protected]
brew unlink [email protected]
brew link postgresql
@TheHemantKaushik
TheHemantKaushik / flutter_tab_navigator.dart
Last active November 15, 2022 17:03
This Flutter app example show how to use bottom navigation bar with tabs inner navigation. Also, how to handle Android's back button to pop inner screens of tab and double tap bottom navigation item to pop all inner screens of a tab.
///
/// Example GIF image:
/// https://ibb.co/mbqF72Q
///
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {