This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh codespace ssh --config >> ~/.ssh/config | |
cat ~/.ssh/codespaces | |
# copy the hostname (cs.something.dev-container) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install gh | |
gh auth login | |
gh auth refresh -h github.com -s codespace | |
gh codespace ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// resolve-url-loader must be used before sass-loader | |
environment.loaders.get("sass").use.splice(-1, 0, { | |
loader: "resolve-url-loader", | |
}); | |
... | |
// at the end of the file | |
environment.loaders.delete("nodeModules") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const TerserPlugin = require("terser-webpack-plugin"); | |
environment.config.merge({ | |
devtool: "hidden-source-map", | |
optimization: { | |
minimizer: [ | |
new TerserPlugin({ | |
extractComments: false, | |
parallel: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"terser-webpack-plugin": "^5.1.4", // webpack5 | |
OR | |
"terser-webpack-plugin": "^4.2.3", // webpack4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add terser-webpack-plugin --save | |
OR | |
npm install terser-webpack-plugin --save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const CompressionPlugin = require("compression-webpack-plugin"); | |
environment.plugins.prepend( | |
"Compression", | |
new CompressionPlugin({ | |
filename: "[path].br[query]", | |
algorithm: "brotliCompress", | |
test: /\.(ts|tsx|js|jsx|css|scss|png|jpeg|jpg|svg|eot|woff|woff2|ttf|otf)$/, | |
compressionOptions: { level: 11 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"compression-webpack-plugin": "^8.0.1", // wepack 5 | |
OR | |
"compression-webpack-plugin": "^6.1.1", // webpack 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add compression-webpack-plugin --save | |
OR | |
npm install compression-webpack-plugin --save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="reactappv1"></div> | |
<%= javascript_packs_with_chunks_tag 'spa/app' %> |
NewerOlder