This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
forked from stream-labs/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split prod and dev webpack bundles (stream-labs#1618)
* Split prod and dev webpack bundles * Refactor webpack config into a merged model * Add CI webpack config * Only remove guest-api for yarn watch-app * Label configs more clearly
- Loading branch information
1 parent
dba0340
commit ded23ac
Showing
8 changed files
with
148 additions
and
55 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const merge = require('webpack-merge'); | ||
const devConfig = require('./dev.config.js'); | ||
|
||
module.exports = merge.strategy({ entry: 'replace' })(devConfig, { | ||
entry: { renderer: './app/app.ts' }, | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const merge = require('webpack-merge'); | ||
const baseConfig = require('./base.config.js'); | ||
const path = require('path'); | ||
|
||
const plugins = []; | ||
|
||
// only makes sense with transpileOnly mode which is currently broken | ||
// const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
// plugins.push(new ForkTsCheckerWebpackPlugin({ vue: true })) | ||
|
||
module.exports = merge.smart(baseConfig, { | ||
entry: { | ||
renderer: './app/app.ts', | ||
updater: './updater/ui.js', | ||
'guest-api': './guest-api', | ||
}, | ||
|
||
mode: 'development', | ||
devtool: 'cheap-module-source-map', | ||
watchOptions: { ignored: /node_modules/ }, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
loader: 'ts-loader', | ||
options: { | ||
experimentalWatchApi: true, | ||
// transpileOnly: true, | ||
}, | ||
exclude: /node_modules|vue\/src/ | ||
}, | ||
{ | ||
test: /\.tsx$/, | ||
include: path.resolve(__dirname, 'app/components'), | ||
use: [ | ||
{ loader: 'babel-loader' }, | ||
{ | ||
loader: 'ts-loader', | ||
options: { | ||
appendTsxSuffixTo: [/\.vue$/], | ||
experimentalWatchApi: true, | ||
// transpileOnly: true, | ||
} | ||
} | ||
], | ||
exclude: /node_modules/, | ||
}, | ||
] | ||
}, | ||
|
||
plugins, | ||
}); |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const merge = require('webpack-merge'); | ||
const baseConfig = require('./base.config.js'); | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
|
||
module.exports = merge.smart(baseConfig, { | ||
entry: { | ||
renderer: './app/app.ts', | ||
updater: './updater/ui.js', | ||
'guest-api': './guest-api' | ||
}, | ||
|
||
mode: 'production', | ||
devtool: 'source-map', | ||
|
||
optimization: { | ||
minimizer: [new TerserPlugin({ | ||
parallel: true, | ||
sourceMap: true, | ||
terserOptions: { mangle: false } | ||
})], | ||
usedExports: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2708,11 +2708,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1: | |
dependencies: | ||
inherits "^2.0.1" | ||
|
||
[email protected]: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-3.0.0.tgz#9b68692e35b0e3510998d0164b6ae5011bea5760" | ||
integrity sha1-m2hpLjWw41EJmNAWS2rlARvqV2A= | ||
|
||
clamp@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" | ||
|
@@ -9018,14 +9013,13 @@ stream-shift@^1.0.0: | |
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" | ||
integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= | ||
|
||
streamlabs-beaker@^0.3.56: | ||
version "0.3.82" | ||
resolved "https://registry.yarnpkg.com/streamlabs-beaker/-/streamlabs-beaker-0.3.82.tgz#ad511ee434be5b9377cc9de5402a0254bab0e9bf" | ||
integrity sha512-jddvSJvxjkyvvnET87HDfIQJ9emT3ZWHsMsJiigk43o1PUyvQ9kAQzV8F9OOlXn4SuwZ3/tyT89lzTZXr+lZPw== | ||
streamlabs-beaker@^0.4.6: | ||
version "0.4.6" | ||
resolved "https://registry.yarnpkg.com/streamlabs-beaker/-/streamlabs-beaker-0.4.4.tgz#b18bac848c89e8b9a1a6d2d5f586cfb54658afc5" | ||
integrity sha512-d6mlYW6bTwVEDIHc0tSEtsyczJtMv+5/x3Oqp79vgL1DAqVyYvRDoszhN9z7MaWrE9X6Jby1JTh/mnlKixIROQ== | ||
dependencies: | ||
google-fonts-webpack-plugin "^0.4.4" | ||
v-tooltip "^2.0.0-rc.33" | ||
vee-validate "^2.1.7" | ||
vue "^2.6.6" | ||
vue-class-component "^6.0.0" | ||
vue-color "^2.7.0" | ||
|
@@ -10135,7 +10129,7 @@ validate-npm-package-license@^3.0.1: | |
spdx-correct "~1.0.0" | ||
spdx-expression-parse "~1.0.0" | ||
|
||
[email protected], vee-validate@^2.1.7: | ||
[email protected]: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-2.2.0.tgz#0dcb6251a50cde9a3a1e924c917cc3d0a543b661" | ||
integrity sha512-s72VQcl1DWTNQKQyHtUDcU536dIx/GYDnCObDj4AXDZtWnqM3rXbgp7FCT3D2q9HFKw7IykW9bVrClhPBeQnrw== | ||
|
@@ -10436,6 +10430,13 @@ [email protected]: | |
v8-compile-cache "^2.0.2" | ||
yargs "^12.0.2" | ||
|
||
webpack-merge@^4.2.1: | ||
version "4.2.1" | ||
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" | ||
integrity sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw== | ||
dependencies: | ||
lodash "^4.17.5" | ||
|
||
webpack-sources@^0.2.0: | ||
version "0.2.3" | ||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" | ||
|