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
module.exports = function override(config, env) { | |
... | |
return config; | |
} |
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 paths = require('./paths'); | |
... | |
module.exports = function(webpackEnv) { | |
... | |
return { | |
... | |
entry: [ | |
isEnvDevelopment && | |
require.resolve('react-dev-utils/webpackHotDevClient'), |
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
... | |
entry: [ paths.appIndexJs ], | |
... |
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
... | |
entry: { | |
popup: paths.appIndexJs, | |
options: paths.appSrc + '/options.js', | |
background: paths.appSrc + '/background.js', | |
content: paths.appSrc + '/content.js' | |
}, | |
... |
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 paths = require('react-scripts/config/paths'); | |
... | |
module.exports = function override(config, env) { | |
config.entry = { | |
popup: paths.appIndexJs, | |
options: paths.appSrc + '/options.js', | |
background: paths.appSrc + '/background.js', | |
content: paths.appSrc + '/content.js' | |
} | |
... |
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
... | |
output: { | |
... | |
filename: isEnvProduction | |
? 'static/js/[name].[contenthash:8].js' | |
: isEnvDevelopment && 'static/js/bundle.js', | |
... | |
}, | |
... |
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
module.exports = function override(config, env) { | |
... | |
config.output.filename = 'static/js/[name].js'; | |
... | |
} |
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
module.exports = function override(config, env) { | |
... | |
config.optimization.splitChunks = { | |
cacheGroups: {default: false} | |
}; | |
config.optimization.runtimeChunk = false; | |
... | |
} |
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 HtmlWebpackPlugin = require('html-webpack-plugin'); | |
... | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
inject: true, | |
template: paths.appHtml, | |
minify: { | |
removeComments: true, | |
collapseWhitespace: 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
new HtmlWebpackPlugin({ | |
inject: true, | |
template: paths.appHtml, | |
filename: 'popup.html', | |
chunks: ['popup'], | |
minify: { | |
removeComments: true, | |
collapseWhitespace: true, | |
removeRedundantAttributes: true, | |
useShortDoctype: true, |
OlderNewer