mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 19:06:36 +00:00
don't compress for CI runs (#1949)
This commit is contained in:
parent
aebd1a1be1
commit
eb505d4bd7
@ -4,6 +4,7 @@ const config = require("./config.js");
|
|||||||
const { babelLoaderConfig } = require("../config/babel.js");
|
const { babelLoaderConfig } = require("../config/babel.js");
|
||||||
|
|
||||||
const isProdBuild = process.env.NODE_ENV === "production";
|
const isProdBuild = process.env.NODE_ENV === "production";
|
||||||
|
const isCI = process.env.CI === "true";
|
||||||
const chunkFilename = isProdBuild ? "chunk.[chunkhash].js" : "[name].chunk.js";
|
const chunkFilename = isProdBuild ? "chunk.[chunkhash].js" : "[name].chunk.js";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -37,6 +38,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
isProdBuild &&
|
isProdBuild &&
|
||||||
|
isCI &&
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
cache: true,
|
cache: true,
|
||||||
exclude: [/\.js\.map$/, /\.LICENSE$/, /\.py$/, /\.txt$/],
|
exclude: [/\.js\.map$/, /\.LICENSE$/, /\.py$/, /\.txt$/],
|
||||||
|
@ -15,6 +15,7 @@ if (!version) {
|
|||||||
throw Error("Version not found");
|
throw Error("Version not found");
|
||||||
}
|
}
|
||||||
const VERSION = version[0];
|
const VERSION = version[0];
|
||||||
|
const isCI = process.env.CI === "true";
|
||||||
|
|
||||||
const generateJSPage = (entrypoint, latestBuild) => {
|
const generateJSPage = (entrypoint, latestBuild) => {
|
||||||
return new HtmlWebpackPlugin({
|
return new HtmlWebpackPlugin({
|
||||||
@ -159,6 +160,7 @@ function createConfig(isProdBuild, latestBuild) {
|
|||||||
path.resolve(__dirname, "src/util/empty.js")
|
path.resolve(__dirname, "src/util/empty.js")
|
||||||
),
|
),
|
||||||
isProdBuild &&
|
isProdBuild &&
|
||||||
|
!isCI &&
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
cache: true,
|
cache: true,
|
||||||
exclude: [/\.js\.map$/, /\.LICENSE$/, /\.py$/, /\.txt$/],
|
exclude: [/\.js\.map$/, /\.LICENSE$/, /\.py$/, /\.txt$/],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user