Merge branch 'master' into fix-viewer
This commit is contained in:
commit
1642672c8d
2 changed files with 15 additions and 0 deletions
|
@ -46,6 +46,7 @@
|
||||||
"electron-publisher-s3": "^20.8.1",
|
"electron-publisher-s3": "^20.8.1",
|
||||||
"electron-updater": "^2.23.3",
|
"electron-updater": "^2.23.3",
|
||||||
"electron-window-state": "^4.1.1",
|
"electron-window-state": "^4.1.1",
|
||||||
|
"filewatcher-webpack-plugin": "^1.2.0",
|
||||||
"find-process": "^1.1.0",
|
"find-process": "^1.1.0",
|
||||||
"formik": "^0.10.4",
|
"formik": "^0.10.4",
|
||||||
"hast-util-sanitize": "^1.1.2",
|
"hast-util-sanitize": "^1.1.2",
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const FilewatcherPlugin = require('filewatcher-webpack-plugin');
|
||||||
|
|
||||||
const ELECTRON_RENDERER_PROCESS_ROOT = path.resolve(__dirname, 'src/renderer/');
|
const ELECTRON_RENDERER_PROCESS_ROOT = path.resolve(__dirname, 'src/renderer/');
|
||||||
|
|
||||||
|
let PROCESS_ARGV = process.env.npm_config_argv;
|
||||||
|
if (PROCESS_ARGV) {
|
||||||
|
PROCESS_ARGV = JSON.parse(PROCESS_ARGV);
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDev = PROCESS_ARGV && PROCESS_ARGV.original &&
|
||||||
|
(PROCESS_ARGV.original.indexOf('dev') !== -1);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
|
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
|
||||||
module: {
|
module: {
|
||||||
|
@ -20,4 +29,9 @@ module.exports = {
|
||||||
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
|
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
|
||||||
extensions: ['.js', '.jsx', '.scss'],
|
extensions: ['.js', '.jsx', '.scss'],
|
||||||
},
|
},
|
||||||
|
plugins: isDev ? [
|
||||||
|
new FilewatcherPlugin({
|
||||||
|
watchFileRegex: [require.resolve('lbry-redux')],
|
||||||
|
}),
|
||||||
|
] : [],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue