Skip to content

Instantly share code, notes, and snippets.

View didi0613's full-sized avatar

Sheng Di didi0613

  • Walmart Labs
  • Sunnyvale, CA
View GitHub Profile
@didi0613
didi0613 / webpack4.md
Last active April 18, 2022 10:15
Migrate to Webpack 4

Upgrade to webpack 4

Config changes

Mode

  • Specify the mode (development/production) explicitly for running webpack.

Plugins

@didi0613
didi0613 / upgrade-components-to-react-16.md
Last active March 13, 2022 07:49
Upgrade your component to React 16
@didi0613
didi0613 / shorten-css-classname.md
Last active March 22, 2021 08:46
Shorten css class names for css module

Shorten css class names for css module

Jira Ticket

https://jira.walmart.com/browse/CEECORE-255

Background

Electrode Application can use css-modules as one of the style options, CSS names can get long with local identifier name and random hash.

@didi0613
didi0613 / 2018-jira-tickets.md
Last active November 27, 2018 20:03
2018 JIRA Tickets
@didi0613
didi0613 / switch-to-oss-app-archeype.md
Last active November 14, 2018 21:37
Switch to OSS app archetype

Switch to OSS app archetype

Changes Required

  • Update your dependencies inside package.json

    Switch internal app archetype

    @walmart/electrode-archetype-react-app
    @walmart/electrode-archetype-react-app-dev
    
@didi0613
didi0613 / webpack4-component-archetype.md
Last active November 14, 2018 02:06
Component Archetype Webpack 3 & 4 Performance Comparison

Webpack 3 & 4 Performance Comparison

Home App

webpack 3

Hash: 8cd9886d070e82aa564e
Version: webpack 3.12.0
Time: 29991ms
@didi0613
didi0613 / home-app-webpack4.md
Last active October 9, 2018 22:10
Webpack 4 performance report

Webpack 4 performance report on home app

Version: webpack 4.20.2
Time: 28190ms
Built at: 2018-10-09 15:07:19
                                                          Asset      Size  Chunks Chunk Names
                 homepage_styles.style.d946634cbdd1f45455ed.css   192 KiB       2  [emitted] homepage_styles
                           1812c8940a09b7e8de827e9e19a63ecb.eot   119 KiB          [emitted]
                          6560fefbed8fc6693665874ad7aa5565.woff  58.8 KiB          [emitted]
@didi0613
didi0613 / core-modules-bundle-size-instructions.md
Last active September 12, 2018 21:21
Use core module bundle sizes cli tool instructions

Core Module Bundle Size Instruction

Clone the CLI tool

Clone core-modules-bundle-size CLI tool to your local

git clone https://gecgithub01.walmart.com/s0d00px/core-modules-bundle-size
@didi0613
didi0613 / core-modules-bundle-size.md
Last active September 4, 2018 23:05
Code Modules Bundle Size

Code Modules Bundle Size Comparison

Option #1: CLI Tool

How does the CLI Tool work?

Generate JS files

@didi0613
didi0613 / gist:a85464cbfa8a570215745e13467e7e32
Last active August 7, 2018 03:10
styles fix for grocery

Duplicated dependencies list for grocery app

From electrode-archetype-react-app(-dev)

  • babel-plugin-transform-object-rest-spread
  • prop-types
  • react
  • react-dom
  • webpack
  • autoprefixer
  • babel-eslint
  • babel-polyfill