wip
This commit is contained in:
parent
fce6c17f4f
commit
81e8588059
14 changed files with 1453 additions and 2041 deletions
10
electron-webpack.json
Normal file
10
electron-webpack.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"renderer": {
|
||||
"webpackConfig": "webpack.electron-renderer.config.js",
|
||||
"sourceDirectory": "./ui/"
|
||||
},
|
||||
"main": {
|
||||
"webpackConfig": "webpack.electron-main.config.js",
|
||||
"sourceDirectory": "./electron/"
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@ console.log(
|
|||
chalk.magenta(`Compiling ${chalk.underline('main')} and ${chalk.underline('render')}, this will take a while.`)
|
||||
);
|
||||
|
||||
let [mainConfig, renderConfig] = require('../webpack.electron.config.js');
|
||||
let [mainConfig, renderConfig] = require('../webpack.electron-main.config.js');
|
||||
|
||||
renderConfig = merge(renderConfig, {
|
||||
entry: { ui: ['webpack-hot-middleware/client'] },
|
||||
|
@ -20,23 +20,16 @@ renderConfig = merge(renderConfig, {
|
|||
alias: { 'react-dom': '@hot-loader/react-dom' },
|
||||
symlinks: false,
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
const mainCompiler = webpack(mainConfig);
|
||||
const mainInstance = middleware(mainCompiler, {
|
||||
logLevel: 'warn',
|
||||
writeToDisk: filename => {
|
||||
// console.log(`Writing '${filename}'.`);
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
const mainInstance = middleware(mainCompiler, { writeToDisk: true });
|
||||
const renderCompiler = webpack(renderConfig);
|
||||
const renderInstance = middleware(renderCompiler, {
|
||||
logLevel: 'warn',
|
||||
publicPath: '/',
|
||||
writeToDisk: true,
|
||||
});
|
||||
|
||||
app.use(require('webpack-hot-middleware')(renderCompiler));
|
||||
app.use(renderInstance);
|
||||
app.use(express.static('dist/electron/static'));
|
||||
|
|
235
flow-typed/npm/electron-webpack_vx.x.x.js
vendored
235
flow-typed/npm/electron-webpack_vx.x.x.js
vendored
|
@ -1,235 +0,0 @@
|
|||
// flow-typed signature: b2525aab5150a9b02d85d0d46aa3572c
|
||||
// flow-typed version: <<STUB>>/electron-webpack_v^2.6.2/flow_v0.94.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'electron-webpack'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'electron-webpack' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'electron-webpack/out/cli' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/dll' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/eslint' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/js' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/ts' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/vue/vue-main-dev-entry' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/configurators/vue/vue' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/core' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/dev/ChildProcessManager' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/dev/dev-runner' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/dev/devUtil' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/dev/WebpackDevServerManager' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/electron-builder' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/electron-main-hmr/HmrClient' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/electron-main-hmr/HmrServer' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/electron-main-hmr/main-hmr' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/main' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/plugins/WatchMatchPlugin' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/plugins/WebpackRemoveOldAssetsPlugin' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/targets/BaseTarget' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/targets/MainTarget' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/targets/RendererTarget' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/out/util' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/vue-renderer-entry' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/webpack.app.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/webpack.main.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/webpack.renderer.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/webpack.renderer.dll.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'electron-webpack/webpack.test.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'electron-webpack/out/cli.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/cli'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/config'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/dll.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/dll'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/eslint.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/eslint'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/js.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/js'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/ts.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/ts'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/vue/vue-main-dev-entry.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/vue/vue-main-dev-entry'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/configurators/vue/vue.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/configurators/vue/vue'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/core.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/core'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/dev/ChildProcessManager.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/dev/ChildProcessManager'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/dev/dev-runner.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/dev/dev-runner'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/dev/devUtil.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/dev/devUtil'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/dev/WebpackDevServerManager.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/dev/WebpackDevServerManager'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/electron-builder.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/electron-builder'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/electron-main-hmr/HmrClient.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/electron-main-hmr/HmrClient'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/electron-main-hmr/HmrServer.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/electron-main-hmr/HmrServer'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/electron-main-hmr/main-hmr.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/electron-main-hmr/main-hmr'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/main.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/main'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/plugins/WatchMatchPlugin.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/plugins/WatchMatchPlugin'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/plugins/WebpackRemoveOldAssetsPlugin.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/plugins/WebpackRemoveOldAssetsPlugin'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/targets/BaseTarget.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/targets/BaseTarget'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/targets/MainTarget.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/targets/MainTarget'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/targets/RendererTarget.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/targets/RendererTarget'>;
|
||||
}
|
||||
declare module 'electron-webpack/out/util.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/out/util'>;
|
||||
}
|
||||
declare module 'electron-webpack/vue-renderer-entry.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/vue-renderer-entry'>;
|
||||
}
|
||||
declare module 'electron-webpack/webpack.app.config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/webpack.app.config'>;
|
||||
}
|
||||
declare module 'electron-webpack/webpack.main.config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/webpack.main.config'>;
|
||||
}
|
||||
declare module 'electron-webpack/webpack.renderer.config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/webpack.renderer.config'>;
|
||||
}
|
||||
declare module 'electron-webpack/webpack.renderer.dll.config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/webpack.renderer.dll.config'>;
|
||||
}
|
||||
declare module 'electron-webpack/webpack.test.config.js' {
|
||||
declare module.exports: $Exports<'electron-webpack/webpack.test.config'>;
|
||||
}
|
594
flow-typed/npm/webpack_v4.x.x.js
vendored
594
flow-typed/npm/webpack_v4.x.x.js
vendored
|
@ -1,594 +0,0 @@
|
|||
// flow-typed signature: 72cb54db24df27a7bac24b0b302df296
|
||||
// flow-typed version: 6cb74e5628/webpack_v4.x.x/flow_>=v0.71.x
|
||||
|
||||
import * as http from 'http';
|
||||
import fs from 'fs';
|
||||
|
||||
declare module 'webpack' {
|
||||
declare class WebpackError extends Error {
|
||||
constructor(message: string): WebpackError;
|
||||
inspect(): string;
|
||||
}
|
||||
|
||||
declare interface Stats {
|
||||
hasErrors(): boolean;
|
||||
hasWarnings(): boolean;
|
||||
toJson(options?: StatsOptions): any;
|
||||
toString(options?: StatsOptions & { colors?: boolean }): string;
|
||||
}
|
||||
|
||||
declare type Callback = (error: WebpackError, stats: Stats) => void;
|
||||
declare type WatchHandler = (error: WebpackError, stats: Stats) => void;
|
||||
|
||||
declare type Watching = {
|
||||
close(): void,
|
||||
invalidate(): void,
|
||||
};
|
||||
|
||||
declare type WebpackCompiler = {
|
||||
run(callback: Callback): void,
|
||||
watch(options: WatchOptions, handler: WatchHandler): Watching,
|
||||
};
|
||||
|
||||
declare type WebpackMultiCompiler = {
|
||||
run(callback: Callback): void,
|
||||
watch(options: WatchOptions, handler: WatchHandler): Watching,
|
||||
};
|
||||
|
||||
declare class WebpackCompilation {
|
||||
constructor(compiler: WebpackCompiler): WebpackCompilation;
|
||||
// <...>
|
||||
}
|
||||
|
||||
declare class WebpackStats {
|
||||
constructor(compilation: WebpackCompilation): WebpackStats;
|
||||
// <...>
|
||||
}
|
||||
|
||||
declare type NonEmptyArrayOfUniqueStringValues = Array<string>;
|
||||
|
||||
declare type EntryObject = {
|
||||
[k: string]: string | NonEmptyArrayOfUniqueStringValues,
|
||||
};
|
||||
|
||||
declare type EntryItem = string | NonEmptyArrayOfUniqueStringValues;
|
||||
|
||||
declare type EntryStatic = EntryObject | EntryItem;
|
||||
|
||||
declare type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;
|
||||
|
||||
declare type Entry = EntryDynamic | EntryStatic;
|
||||
|
||||
declare type ArrayOfStringValues = Array<string>;
|
||||
|
||||
declare type ExternalItem =
|
||||
| string
|
||||
| {
|
||||
[k: string]:
|
||||
| string
|
||||
| {
|
||||
[k: string]: any,
|
||||
}
|
||||
| ArrayOfStringValues
|
||||
| boolean,
|
||||
}
|
||||
| RegExp;
|
||||
|
||||
declare type Externals =
|
||||
| ((
|
||||
context: string,
|
||||
request: string,
|
||||
callback: (err?: Error, result?: string) => void
|
||||
) => void)
|
||||
| ExternalItem
|
||||
| Array<
|
||||
| ((
|
||||
context: string,
|
||||
request: string,
|
||||
callback: (err?: Error, result?: string) => void
|
||||
) => void)
|
||||
| ExternalItem
|
||||
>;
|
||||
|
||||
declare type RuleSetCondition =
|
||||
| RegExp
|
||||
| string
|
||||
| ((value: string) => boolean)
|
||||
| RuleSetConditions
|
||||
| {
|
||||
and?: RuleSetConditions,
|
||||
exclude?: RuleSetConditionOrConditions,
|
||||
include?: RuleSetConditionOrConditions,
|
||||
not?: RuleSetConditions,
|
||||
or?: RuleSetConditions,
|
||||
test?: RuleSetConditionOrConditions,
|
||||
};
|
||||
|
||||
declare type RuleSetConditions = Array<RuleSetCondition>;
|
||||
|
||||
declare type RuleSetConditionOrConditions =
|
||||
| RuleSetCondition
|
||||
| RuleSetConditions;
|
||||
|
||||
declare type RuleSetLoader = string;
|
||||
|
||||
declare type RuleSetQuery = { [k: string]: any } | string;
|
||||
|
||||
declare type RuleSetUseItem =
|
||||
| RuleSetLoader
|
||||
| Function
|
||||
| {
|
||||
ident?: string,
|
||||
loader?: RuleSetLoader,
|
||||
options?: RuleSetQuery,
|
||||
query?: RuleSetQuery,
|
||||
};
|
||||
|
||||
declare type RuleSetUse = RuleSetUseItem | Function | Array<RuleSetUseItem>;
|
||||
|
||||
declare type RuleSetRule = {
|
||||
compiler?: RuleSetConditionOrConditions,
|
||||
enforce?: 'pre' | 'post',
|
||||
exclude?: RuleSetConditionOrConditions,
|
||||
include?: RuleSetConditionOrConditions,
|
||||
issuer?: RuleSetConditionOrConditions,
|
||||
loader?: RuleSetLoader | RuleSetUse,
|
||||
loaders?: RuleSetUse,
|
||||
oneOf?: RuleSetRules,
|
||||
options?: RuleSetQuery,
|
||||
parser?: {
|
||||
[k: string]: any,
|
||||
},
|
||||
query?: RuleSetQuery,
|
||||
resolve?: ResolveOptions,
|
||||
resource?: RuleSetConditionOrConditions,
|
||||
resourceQuery?: RuleSetConditionOrConditions,
|
||||
rules?: RuleSetRules,
|
||||
sideEffects?: boolean,
|
||||
test?: RuleSetConditionOrConditions,
|
||||
type?:
|
||||
| 'javascript/auto'
|
||||
| 'javascript/dynamic'
|
||||
| 'javascript/esm'
|
||||
| 'json'
|
||||
| 'webassembly/experimental',
|
||||
use?: RuleSetUse,
|
||||
};
|
||||
|
||||
declare type RuleSetRules = Array<RuleSetRule>;
|
||||
|
||||
declare type ModuleOptions = {
|
||||
defaultRules?: RuleSetRules,
|
||||
exprContextCritical?: boolean,
|
||||
exprContextRecursive?: boolean,
|
||||
exprContextRegExp?: boolean | RegExp,
|
||||
exprContextRequest?: string,
|
||||
noParse?: Array<RegExp> | RegExp | Function | Array<string> | string,
|
||||
rules?: RuleSetRules,
|
||||
strictExportPresence?: boolean,
|
||||
strictThisContextOnImports?: boolean,
|
||||
unknownContextCritical?: boolean,
|
||||
unknownContextRecursive?: boolean,
|
||||
unknownContextRegExp?: boolean | RegExp,
|
||||
unknownContextRequest?: string,
|
||||
unsafeCache?: boolean | Function,
|
||||
wrappedContextCritical?: boolean,
|
||||
wrappedContextRecursive?: boolean,
|
||||
wrappedContextRegExp?: RegExp,
|
||||
};
|
||||
|
||||
declare type NodeOptions = {
|
||||
Buffer?: false | true | 'mock',
|
||||
__dirname?: false | true | 'mock',
|
||||
__filename?: false | true | 'mock',
|
||||
console?: false | true | 'mock',
|
||||
global?: boolean,
|
||||
process?: false | true | 'mock',
|
||||
[k: string]: false | true | 'mock' | 'empty',
|
||||
};
|
||||
|
||||
declare type WebpackPluginFunction = (compiler: WebpackCompiler) => void;
|
||||
|
||||
declare type WebpackPluginInstance = {
|
||||
apply: WebpackPluginFunction,
|
||||
[k: string]: any,
|
||||
};
|
||||
|
||||
declare type OptimizationSplitChunksOptions = {
|
||||
automaticNameDelimiter?: string,
|
||||
cacheGroups?: {
|
||||
[k: string]:
|
||||
| false
|
||||
| Function
|
||||
| string
|
||||
| RegExp
|
||||
| {
|
||||
automaticNameDelimiter?: string,
|
||||
automaticNamePrefix?: string,
|
||||
chunks?: ('initial' | 'async' | 'all') | Function,
|
||||
enforce?: boolean,
|
||||
filename?: string,
|
||||
maxAsyncRequests?: number,
|
||||
maxInitialRequests?: number,
|
||||
maxSize?: number,
|
||||
minChunks?: number,
|
||||
minSize?: number,
|
||||
name?: boolean | Function | string,
|
||||
priority?: number,
|
||||
reuseExistingChunk?: boolean,
|
||||
test?: Function | string | RegExp,
|
||||
},
|
||||
},
|
||||
chunks?: ('initial' | 'async' | 'all') | Function,
|
||||
fallbackCacheGroup?: {
|
||||
automaticNameDelimiter?: string,
|
||||
maxSize?: number,
|
||||
minSize?: number,
|
||||
},
|
||||
filename?: string,
|
||||
hidePathInfo?: boolean,
|
||||
maxAsyncRequests?: number,
|
||||
maxInitialRequests?: number,
|
||||
maxSize?: number,
|
||||
minChunks?: number,
|
||||
minSize?: number,
|
||||
name?: boolean | Function | string,
|
||||
};
|
||||
|
||||
declare type OptimizationOptions = {
|
||||
checkWasmTypes?: boolean,
|
||||
chunkIds?: 'natural' | 'named' | 'size' | 'total-size' | false,
|
||||
concatenateModules?: boolean,
|
||||
flagIncludedChunks?: boolean,
|
||||
hashedModuleIds?: boolean,
|
||||
mangleWasmImports?: boolean,
|
||||
mergeDuplicateChunks?: boolean,
|
||||
minimize?: boolean,
|
||||
minimizer?: Array<WebpackPluginInstance | WebpackPluginFunction>,
|
||||
moduleIds?: 'natural' | 'named' | 'hashed' | 'size' | 'total-size' | false,
|
||||
namedChunks?: boolean,
|
||||
namedModules?: boolean,
|
||||
noEmitOnErrors?: boolean,
|
||||
nodeEnv?: false | string,
|
||||
occurrenceOrder?: boolean,
|
||||
portableRecords?: boolean,
|
||||
providedExports?: boolean,
|
||||
removeAvailableModules?: boolean,
|
||||
removeEmptyChunks?: boolean,
|
||||
runtimeChunk?:
|
||||
| boolean
|
||||
| ('single' | 'multiple')
|
||||
| {
|
||||
name?: string | Function,
|
||||
},
|
||||
sideEffects?: boolean,
|
||||
splitChunks?: false | OptimizationSplitChunksOptions,
|
||||
usedExports?: boolean,
|
||||
};
|
||||
|
||||
declare type LibraryCustomUmdObject = {
|
||||
amd?: string,
|
||||
commonjs?: string,
|
||||
root?: string | ArrayOfStringValues,
|
||||
};
|
||||
|
||||
declare type OutputOptions = {
|
||||
auxiliaryComment?:
|
||||
| string
|
||||
| {
|
||||
amd?: string,
|
||||
commonjs?: string,
|
||||
commonjs2?: string,
|
||||
root?: string,
|
||||
},
|
||||
chunkCallbackName?: string,
|
||||
chunkFilename?: string,
|
||||
chunkLoadTimeout?: number,
|
||||
crossOriginLoading?: false | 'anonymous' | 'use-credentials',
|
||||
devtoolFallbackModuleFilenameTemplate?: string | Function,
|
||||
devtoolLineToLine?: boolean | { [k: string]: any },
|
||||
devtoolModuleFilenameTemplate?: string | Function,
|
||||
devtoolNamespace?: string,
|
||||
filename?: string | Function,
|
||||
globalObject?: string,
|
||||
hashDigest?: string,
|
||||
hashDigestLength?: number,
|
||||
hashFunction?: string | Function,
|
||||
hashSalt?: string,
|
||||
hotUpdateChunkFilename?: string | Function,
|
||||
hotUpdateFunction?: string,
|
||||
hotUpdateMainFilename?: string | Function,
|
||||
jsonpFunction?: string,
|
||||
jsonpScriptType?: false | 'text/javascript' | 'module',
|
||||
library?: string | Array<string> | LibraryCustomUmdObject,
|
||||
libraryExport?: string | ArrayOfStringValues,
|
||||
libraryTarget?:
|
||||
| 'var'
|
||||
| 'assign'
|
||||
| 'this'
|
||||
| 'window'
|
||||
| 'self'
|
||||
| 'global'
|
||||
| 'commonjs'
|
||||
| 'commonjs2'
|
||||
| 'commonjs-module'
|
||||
| 'amd'
|
||||
| 'amd-require'
|
||||
| 'umd'
|
||||
| 'umd2'
|
||||
| 'jsonp',
|
||||
path?: string,
|
||||
pathinfo?: boolean,
|
||||
publicPath?: string | Function,
|
||||
sourceMapFilename?: string,
|
||||
sourcePrefix?: string,
|
||||
strictModuleExceptionHandling?: boolean,
|
||||
umdNamedDefine?: boolean,
|
||||
webassemblyModuleFilename?: string,
|
||||
};
|
||||
|
||||
declare type PerformanceOptions = {
|
||||
assetFilter?: Function,
|
||||
hints?: false | 'warning' | 'error',
|
||||
maxAssetSize?: number,
|
||||
maxEntrypointSize?: number,
|
||||
};
|
||||
|
||||
declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>;
|
||||
|
||||
declare type ResolveOptions = {
|
||||
alias?:
|
||||
| { [k: string]: string }
|
||||
| Array<{
|
||||
alias?: string,
|
||||
name?: string,
|
||||
onlyModule?: boolean,
|
||||
}>,
|
||||
aliasFields?: ArrayOfStringOrStringArrayValues,
|
||||
cachePredicate?: Function,
|
||||
cacheWithContext?: boolean,
|
||||
concord?: boolean,
|
||||
descriptionFiles?: ArrayOfStringValues,
|
||||
enforceExtension?: boolean,
|
||||
enforceModuleExtension?: boolean,
|
||||
extensions?: ArrayOfStringValues,
|
||||
fileSystem?: { [k: string]: any },
|
||||
mainFields?: ArrayOfStringOrStringArrayValues,
|
||||
mainFiles?: ArrayOfStringValues,
|
||||
moduleExtensions?: ArrayOfStringValues,
|
||||
modules?: ArrayOfStringValues,
|
||||
plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,
|
||||
resolver?: { [k: string]: any },
|
||||
symlinks?: boolean,
|
||||
unsafeCache?: boolean | { [k: string]: any },
|
||||
useSyncFileSystemCalls?: boolean,
|
||||
};
|
||||
|
||||
declare type FilterItemTypes = RegExp | string | Function;
|
||||
|
||||
declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;
|
||||
|
||||
declare type StatsOptions =
|
||||
| boolean
|
||||
| ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')
|
||||
| {
|
||||
all?: boolean,
|
||||
assets?: boolean,
|
||||
assetsSort?: string,
|
||||
builtAt?: boolean,
|
||||
cached?: boolean,
|
||||
cachedAssets?: boolean,
|
||||
children?: boolean,
|
||||
chunkGroups?: boolean,
|
||||
chunkModules?: boolean,
|
||||
chunkOrigins?: boolean,
|
||||
chunks?: boolean,
|
||||
chunksSort?: string,
|
||||
colors?:
|
||||
| boolean
|
||||
| {
|
||||
bold?: string,
|
||||
cyan?: string,
|
||||
green?: string,
|
||||
magenta?: string,
|
||||
red?: string,
|
||||
yellow?: string,
|
||||
},
|
||||
context?: string,
|
||||
depth?: boolean,
|
||||
entrypoints?: boolean,
|
||||
env?: boolean,
|
||||
errorDetails?: boolean,
|
||||
errors?: boolean,
|
||||
exclude?: FilterTypes | boolean,
|
||||
excludeAssets?: FilterTypes,
|
||||
excludeModules?: FilterTypes | boolean,
|
||||
hash?: boolean,
|
||||
maxModules?: number,
|
||||
moduleAssets?: boolean,
|
||||
moduleTrace?: boolean,
|
||||
modules?: boolean,
|
||||
modulesSort?: string,
|
||||
nestedModules?: boolean,
|
||||
optimizationBailout?: boolean,
|
||||
outputPath?: boolean,
|
||||
performance?: boolean,
|
||||
providedExports?: boolean,
|
||||
publicPath?: boolean,
|
||||
reasons?: boolean,
|
||||
source?: boolean,
|
||||
timings?: boolean,
|
||||
usedExports?: boolean,
|
||||
version?: boolean,
|
||||
warnings?: boolean,
|
||||
warningsFilter?: FilterTypes,
|
||||
};
|
||||
|
||||
declare type WatchOptions = {
|
||||
aggregateTimeout?: number,
|
||||
ignored?: { [k: string]: any },
|
||||
poll?: boolean | number,
|
||||
stdin?: boolean,
|
||||
};
|
||||
|
||||
declare type WebpackOptions = {
|
||||
amd?: { [k: string]: any },
|
||||
bail?: boolean,
|
||||
cache?: boolean | { [k: string]: any },
|
||||
context?: string,
|
||||
dependencies?: Array<string>,
|
||||
devServer?: {
|
||||
after?: (app: any, server: http.Server) => void,
|
||||
allowedHosts?: string[],
|
||||
before?: (app: any, server: http.Server) => void,
|
||||
bonjour?: boolean,
|
||||
clientLogLevel?: 'none' | 'info' | 'error' | 'warning',
|
||||
compress?: boolean,
|
||||
contentBase?: false | string | string[] | number,
|
||||
disableHostCheck?: boolean,
|
||||
filename?: string,
|
||||
headers?: { [key: string]: string },
|
||||
historyApiFallback?:
|
||||
| boolean
|
||||
| {
|
||||
rewrites?: Array<{ from: string, to: string }>,
|
||||
disableDotRule?: boolean,
|
||||
},
|
||||
host?: string,
|
||||
hot?: boolean,
|
||||
hotOnly?: boolean,
|
||||
https?:
|
||||
| boolean
|
||||
| {
|
||||
key: string,
|
||||
cert: string,
|
||||
ca?: string,
|
||||
},
|
||||
index?: string,
|
||||
inline?: boolean,
|
||||
lazy?: boolean,
|
||||
noInfo?: boolean,
|
||||
open?: boolean | string,
|
||||
openPage?: string,
|
||||
overlay?:
|
||||
| boolean
|
||||
| {
|
||||
errors?: boolean,
|
||||
warnings?: boolean,
|
||||
},
|
||||
pfx?: string,
|
||||
pfxPassphrase?: string,
|
||||
port?: number,
|
||||
proxy?: Object | Array<Object | Function>,
|
||||
public?: string,
|
||||
publicPath?: string,
|
||||
quiet?: boolean,
|
||||
socket?: string,
|
||||
staticOptions?: {
|
||||
dotfiles?: string,
|
||||
etag?: boolean,
|
||||
extensions?: false | string[],
|
||||
fallthrough?: boolean,
|
||||
immutable?: boolean,
|
||||
index?: false | string,
|
||||
lastModified?: boolean,
|
||||
maxAge?: number,
|
||||
redirect?: boolean,
|
||||
setHeaders?: (
|
||||
res: http.OutgoingMessage,
|
||||
path: string,
|
||||
stat: fs.Stat
|
||||
) => void,
|
||||
},
|
||||
stats?: StatsOptions,
|
||||
useLocalIp?: boolean,
|
||||
watchContentBase?: boolean,
|
||||
watchOptions?: WatchOptions,
|
||||
publicPath?: string,
|
||||
},
|
||||
devtool?:
|
||||
| '@cheap-eval-source-map'
|
||||
| '@cheap-module-eval-source-map'
|
||||
| '@cheap-module-source-map'
|
||||
| '@cheap-source-map'
|
||||
| '@eval-source-map'
|
||||
| '@eval'
|
||||
| '@hidden-source-map'
|
||||
| '@inline-source-map'
|
||||
| '@nosources-source-map'
|
||||
| '@source-map'
|
||||
| '#@cheap-eval-source-map'
|
||||
| '#@cheap-module-eval-source-map'
|
||||
| '#@cheap-module-source-map'
|
||||
| '#@cheap-source-map'
|
||||
| '#@eval-source-map'
|
||||
| '#@eval'
|
||||
| '#@hidden-source-map'
|
||||
| '#@inline-source-map'
|
||||
| '#@nosources-source-map'
|
||||
| '#@source-map'
|
||||
| '#cheap-eval-source-map'
|
||||
| '#cheap-module-eval-source-map'
|
||||
| '#cheap-module-source-map'
|
||||
| '#cheap-source-map'
|
||||
| '#eval-source-map'
|
||||
| '#eval'
|
||||
| '#hidden-source-map'
|
||||
| '#inline-source-map'
|
||||
| '#nosources-source-map'
|
||||
| '#source-map'
|
||||
| 'cheap-eval-source-map'
|
||||
| 'cheap-module-eval-source-map'
|
||||
| 'cheap-module-source-map'
|
||||
| 'cheap-source-map'
|
||||
| 'eval-source-map'
|
||||
| 'eval'
|
||||
| 'hidden-source-map'
|
||||
| 'inline-source-map'
|
||||
| 'nosources-source-map'
|
||||
| 'source-map'
|
||||
| false,
|
||||
entry?: Entry,
|
||||
externals?: Externals,
|
||||
loader?: { [k: string]: any },
|
||||
mode?: 'development' | 'production' | 'none',
|
||||
module?: ModuleOptions,
|
||||
name?: string,
|
||||
node?: false | NodeOptions,
|
||||
optimization?: OptimizationOptions,
|
||||
output?: OutputOptions,
|
||||
parallelism?: number,
|
||||
performance?: false | PerformanceOptions,
|
||||
plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,
|
||||
profile?: boolean,
|
||||
recordsInputPath?: string,
|
||||
recordsOutputPath?: string,
|
||||
recordsPath?: string,
|
||||
resolve?: ResolveOptions,
|
||||
resolveLoader?: ResolveOptions,
|
||||
serve?: { [k: string]: any },
|
||||
stats?: StatsOptions,
|
||||
target?:
|
||||
| 'web'
|
||||
| 'webworker'
|
||||
| 'node'
|
||||
| 'async-node'
|
||||
| 'node-webkit'
|
||||
| 'electron-main'
|
||||
| 'electron-renderer'
|
||||
| ((compiler: WebpackCompiler) => void),
|
||||
watch?: boolean,
|
||||
watchOptions?: WatchOptions,
|
||||
};
|
||||
|
||||
declare function builder(
|
||||
options: WebpackOptions,
|
||||
callback?: Callback
|
||||
): WebpackCompiler;
|
||||
declare function builder(
|
||||
options: WebpackOptions[],
|
||||
callback?: Callback
|
||||
): WebpackMultiCompiler;
|
||||
|
||||
declare module.exports: typeof builder;
|
||||
}
|
39
package.json
39
package.json
|
@ -25,7 +25,7 @@
|
|||
"compile": "cross-env NODE_ENV=production yarn compile:electron && cross-env NODE_ENV=production yarn compile:web",
|
||||
"copyenv": "cp ./.env* web/",
|
||||
"dev": "yarn dev:electron",
|
||||
"dev:electron": "cross-env NODE_ENV=development node ./electron/devServer.js",
|
||||
"dev:electron": "cross-env NODE_ENV=development electron-webpack dev",
|
||||
"dev:web": "yarn copyenv && cd web && yarn dev",
|
||||
"dev:web-server": "cross-env NODE_ENV=development yarn compile:web && concurrently \"cross-env NODE_ENV=development yarn compile:web --watch\" \"cd web && yarn dev:server\"",
|
||||
"dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev:electron",
|
||||
|
@ -52,9 +52,7 @@
|
|||
"electron-updater": "^4.2.4",
|
||||
"express": "^4.17.1",
|
||||
"if-env": "^1.0.4",
|
||||
"remark-breaks": "^1.0.5",
|
||||
"tempy": "^0.6.0",
|
||||
"videojs-logo": "^2.0.0"
|
||||
"tempy": "^0.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
|
@ -77,6 +75,7 @@
|
|||
"@reach/tabs": "^0.1.5",
|
||||
"@sentry/browser": "^5.12.1",
|
||||
"@sentry/webpack-plugin": "^1.10.0",
|
||||
"@types/react": "^16.9.56",
|
||||
"@types/three": "^0.93.1",
|
||||
"adm-zip": "^0.4.13",
|
||||
"async-exit-hook": "^2.0.1",
|
||||
|
@ -97,15 +96,15 @@
|
|||
"cross-env": "^5.2.0",
|
||||
"crypto-js": "^4.0.0",
|
||||
"css-doodle": "^0.7.1",
|
||||
"css-loader": "^2.1.0",
|
||||
"css-loader": "^5.0.1",
|
||||
"cssnano": "^4.1.10",
|
||||
"dat.gui": "^0.7.2",
|
||||
"decompress": "^4.2.1",
|
||||
"del": "^3.0.0",
|
||||
"devtron": "^1.4.0",
|
||||
"dom-scroll-into-view": "^1.2.1",
|
||||
"dotenv-defaults": "^1.1.1",
|
||||
"dotenv-webpack": "^1.8.0",
|
||||
"dotenv-defaults": "^2.0.1",
|
||||
"dotenv-webpack": "^5.1.0",
|
||||
"electron": "9.3.1",
|
||||
"electron-builder": "^22.9.1",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
|
@ -126,14 +125,16 @@
|
|||
"eslint-plugin-react": "^7.7.0",
|
||||
"eslint-plugin-react-hooks": "^1.6.0",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"file-loader": "^4.2.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"flow-bin": "^0.97.0",
|
||||
"flow-typed": "^2.3.0",
|
||||
"formik": "^0.10.4",
|
||||
"hast-util-sanitize": "^1.1.2",
|
||||
"history": "^4.9.0",
|
||||
"https-browserify": "^1.0.0",
|
||||
"husky": "^3.1.0",
|
||||
"imagesloaded": "^4.1.4",
|
||||
"immutable": "3.8",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#c86810038c966f5d88e1df7b787fbe1d31a96802",
|
||||
|
@ -149,6 +150,8 @@
|
|||
"node-loader": "^0.6.0",
|
||||
"node-sass": "^4.11.0",
|
||||
"nodemon": "^1.19.1",
|
||||
"os-browserify": "^0.3.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-rtl": "^1.7.3",
|
||||
|
@ -156,7 +159,7 @@
|
|||
"prettier": "^1.11.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"qrcode.react": "^0.8.0",
|
||||
"raw-loader": "^2.0.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rc-progress": "^2.0.6",
|
||||
"react": "^16.8.2",
|
||||
"react-confetti": "^4.0.1",
|
||||
|
@ -179,15 +182,19 @@
|
|||
"redux-thunk": "^2.2.0",
|
||||
"remark": "^9.0.0",
|
||||
"remark-attr": "^0.8.3",
|
||||
"remark-breaks": "^1.0.5",
|
||||
"remark-emoji": "^2.0.1",
|
||||
"remark-react": "^4.0.3",
|
||||
"reselect": "^3.0.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"sass-loader": "^10.1.0",
|
||||
"seamless-immutable": "^7.1.4",
|
||||
"semver": "^5.3.0",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"stream-http": "^3.1.1",
|
||||
"stream-to-blob-url": "^2.1.1",
|
||||
"strip-markdown": "^3.0.3",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.2.3",
|
||||
"thread-loader": "^3.0.1",
|
||||
"three": "^0.93.0",
|
||||
"three-full": "^17.1.0",
|
||||
"tiny-relative-date": "^1.3.0",
|
||||
|
@ -197,13 +204,13 @@
|
|||
"video.js": "^7.10.1",
|
||||
"videojs-event-tracking": "^1.0.1",
|
||||
"villain-react": "^1.0.9",
|
||||
"vm-browserify": "^1.1.2",
|
||||
"wavesurfer.js": "^2.2.1",
|
||||
"webpack": "^4.28.4",
|
||||
"webpack-bundle-analyzer": "^3.1.0",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack": "^5.4.0",
|
||||
"webpack-cli": "^4.2.0",
|
||||
"webpack-config-utils": "^2.3.1",
|
||||
"webpack-dev-middleware": "^3.6.0",
|
||||
"webpack-dev-server": "^3.9.0",
|
||||
"webpack-dev-middleware": "^4.0.2",
|
||||
"webpack-dev-server": "^3.11.0",
|
||||
"webpack-hot-middleware": "^2.24.3",
|
||||
"webpack-merge": "^4.2.1",
|
||||
"webpack-node-externals": "^1.7.2",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// @flow
|
||||
|
||||
import React from 'react';
|
||||
import Lbry from 'lbry-redux';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import Button from 'component/button';
|
||||
import Spinner from 'component/spinner';
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
|
|||
// import { selectDaemonSettings } from 'redux/selectors/settings';
|
||||
import { doSyncSubscribe, doSetPrefsReady } from 'redux/actions/sync';
|
||||
import { doAuthenticate } from 'redux/actions/user';
|
||||
import { lbrySettings as config, version as appVersion } from 'package.json';
|
||||
import packageJson from 'package.json';
|
||||
import analytics, { SHARE_INTERNAL } from 'analytics';
|
||||
import { doSignOutCleanup, deleteSavedPassword } from 'util/saved-passwords';
|
||||
import { doSocketConnect } from 'redux/actions/websocket';
|
||||
|
@ -64,6 +64,7 @@ const { download } = remote.require('electron-dl');
|
|||
const Fs = remote.require('fs');
|
||||
// @endif
|
||||
|
||||
const { lbrySettings: config, version: appVersion } = packageJson;
|
||||
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
||||
|
||||
export function doOpenModal(id, modalProps = {}) {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
@import 'init/mixins';
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
"nodemon": "^1.19.4",
|
||||
"speed-measure-webpack-plugin": "^1.3.1",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-bundle-analyzer": "^3.6.0",
|
||||
"webpack-dev-server": "^3.9.0",
|
||||
"webpack-merge": "^4.2.2",
|
||||
"write-file-webpack-plugin": "^4.5.1"
|
||||
|
|
|
@ -1010,12 +1010,7 @@ accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
|
|||
mime-types "~2.1.24"
|
||||
negotiator "0.6.2"
|
||||
|
||||
acorn-walk@^6.1.1:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c"
|
||||
integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==
|
||||
|
||||
acorn@^6.0.7, acorn@^6.2.1:
|
||||
acorn@^6.2.1:
|
||||
version "6.4.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474"
|
||||
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
|
||||
|
@ -1221,16 +1216,6 @@ batch@0.6.1:
|
|||
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
|
||||
integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=
|
||||
|
||||
bfj@^6.1.1:
|
||||
version "6.1.2"
|
||||
resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f"
|
||||
integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==
|
||||
dependencies:
|
||||
bluebird "^3.5.5"
|
||||
check-types "^8.0.3"
|
||||
hoopy "^0.1.4"
|
||||
tryer "^1.0.1"
|
||||
|
||||
big.js@^5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
||||
|
@ -1514,7 +1499,7 @@ capture-stack-trace@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d"
|
||||
integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==
|
||||
|
||||
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2:
|
||||
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.0, chalk@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
|
@ -1523,11 +1508,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2:
|
|||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
check-types@^8.0.3:
|
||||
version "8.0.3"
|
||||
resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552"
|
||||
integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==
|
||||
|
||||
chokidar@^2.0.2, chokidar@^2.1.8:
|
||||
version "2.1.8"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"
|
||||
|
@ -1626,7 +1606,7 @@ color-name@1.1.3:
|
|||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||
|
||||
commander@^2.18.0, commander@^2.20.0:
|
||||
commander@^2.20.0:
|
||||
version "2.20.3"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
|
@ -2075,11 +2055,6 @@ duplexer3@^0.1.4:
|
|||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||
|
||||
duplexer@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
|
||||
integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=
|
||||
|
||||
duplexify@^3.4.2, duplexify@^3.6.0:
|
||||
version "3.7.1"
|
||||
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309"
|
||||
|
@ -2095,11 +2070,6 @@ ee-first@1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
ejs@^2.6.1:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.1.tgz#5b5ab57f718b79d4aca9254457afecd36fa80228"
|
||||
integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==
|
||||
|
||||
electron-to-chromium@^1.3.295:
|
||||
version "1.3.305"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.305.tgz#64f38c2986277b15c7b2c81954171ed22bee249b"
|
||||
|
@ -2260,7 +2230,7 @@ expand-brackets@^2.1.4:
|
|||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
express@^4.16.3, express@^4.17.1:
|
||||
express@^4.17.1:
|
||||
version "4.17.1"
|
||||
resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
|
||||
integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
|
||||
|
@ -2606,14 +2576,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
|
|||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
|
||||
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
|
||||
|
||||
gzip-size@^5.0.0:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274"
|
||||
integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==
|
||||
dependencies:
|
||||
duplexer "^0.1.1"
|
||||
pify "^4.0.1"
|
||||
|
||||
handle-thing@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754"
|
||||
|
@ -2697,11 +2659,6 @@ hmac-drbg@^1.0.0:
|
|||
minimalistic-assert "^1.0.0"
|
||||
minimalistic-crypto-utils "^1.0.1"
|
||||
|
||||
hoopy@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
|
||||
integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==
|
||||
|
||||
hpack.js@^2.1.6:
|
||||
version "2.1.6"
|
||||
resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2"
|
||||
|
@ -3977,11 +3934,6 @@ only@~0.0.2:
|
|||
resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
|
||||
integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=
|
||||
|
||||
opener@^1.5.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
|
||||
integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==
|
||||
|
||||
opn@^5.5.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
|
||||
|
@ -5209,11 +5161,6 @@ touch@^3.1.0:
|
|||
dependencies:
|
||||
nopt "~1.0.10"
|
||||
|
||||
tryer@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
|
||||
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==
|
||||
|
||||
tslib@^1.9.0:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||
|
@ -5447,25 +5394,6 @@ wbuf@^1.1.0, wbuf@^1.7.3:
|
|||
dependencies:
|
||||
minimalistic-assert "^1.0.0"
|
||||
|
||||
webpack-bundle-analyzer@^3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.0.tgz#39b3a8f829ca044682bc6f9e011c95deb554aefd"
|
||||
integrity sha512-orUfvVYEfBMDXgEKAKVvab5iQ2wXneIEorGNsyuOyVYpjYrI7CUOhhXNDd3huMwQ3vNNWWlGP+hzflMFYNzi2g==
|
||||
dependencies:
|
||||
acorn "^6.0.7"
|
||||
acorn-walk "^6.1.1"
|
||||
bfj "^6.1.1"
|
||||
chalk "^2.4.1"
|
||||
commander "^2.18.0"
|
||||
ejs "^2.6.1"
|
||||
express "^4.16.3"
|
||||
filesize "^3.6.1"
|
||||
gzip-size "^5.0.0"
|
||||
lodash "^4.17.15"
|
||||
mkdirp "^0.5.1"
|
||||
opener "^1.5.1"
|
||||
ws "^6.0.0"
|
||||
|
||||
webpack-dev-middleware@^3.7.2:
|
||||
version "3.7.2"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3"
|
||||
|
@ -5657,7 +5585,7 @@ write-file-webpack-plugin@^4.5.1:
|
|||
moment "^2.22.1"
|
||||
write-file-atomic "^2.3.0"
|
||||
|
||||
ws@^6.0.0, ws@^6.2.1:
|
||||
ws@^6.2.1:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"
|
||||
integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==
|
||||
|
|
|
@ -3,7 +3,7 @@ const webpack = require('webpack');
|
|||
const Dotenv = require('dotenv-webpack');
|
||||
const { DefinePlugin } = require('webpack');
|
||||
const { getIfUtils } = require('webpack-config-utils');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
// const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
const { ifProduction } = getIfUtils(NODE_ENV);
|
||||
|
@ -13,14 +13,14 @@ const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
|||
let baseConfig = {
|
||||
mode: ifProduction('production', 'development'),
|
||||
devtool: ifProduction('source-map', 'eval-cheap-module-source-map'),
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
// optimization: {
|
||||
// minimizer: [
|
||||
// new TerserPlugin({
|
||||
// parallel: true,
|
||||
// sourceMap: true,
|
||||
// }),
|
||||
// ],
|
||||
// },
|
||||
node: {
|
||||
__dirname: false,
|
||||
},
|
||||
|
@ -41,12 +41,13 @@ let baseConfig = {
|
|||
use: [
|
||||
{ loader: 'style-loader' },
|
||||
{ loader: 'css-loader' },
|
||||
{ loader: 'postcss-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
plugins: function() {
|
||||
return [ require( 'postcss-rtl' )() ]
|
||||
}
|
||||
}
|
||||
return [require('postcss-rtl')()];
|
||||
},
|
||||
},
|
||||
},
|
||||
{ loader: 'sass-loader' },
|
||||
],
|
||||
|
@ -76,7 +77,10 @@ let baseConfig = {
|
|||
alias: {
|
||||
config: path.resolve(__dirname, 'config.js'),
|
||||
homepage: 'util/homepage.js',
|
||||
homepages: process.env.CUSTOM_HOMEPAGE === 'true' ? path.resolve(__dirname, 'custom/homepages/index.js') : ('homepages/index.js'),
|
||||
homepages:
|
||||
process.env.CUSTOM_HOMEPAGE === 'true'
|
||||
? path.resolve(__dirname, 'custom/homepages/index.js')
|
||||
: 'homepages/index.js',
|
||||
lbryinc: 'lbryinc/dist/bundle.es.js',
|
||||
// Build optimizations for 'redux-persist-transform-filter'
|
||||
'redux-persist-transform-filter': 'redux-persist-transform-filter/index.js',
|
||||
|
@ -89,7 +93,15 @@ let baseConfig = {
|
|||
'lodash.clonedeep': 'lodash-es/cloneDeep',
|
||||
...ifProduction({}, { 'react-dom': '@hot-loader/react-dom' }),
|
||||
},
|
||||
symlinks: false,
|
||||
fallback: {
|
||||
crypto: require.resolve('crypto-browserify'),
|
||||
http: require.resolve('stream-http'),
|
||||
https: require.resolve('https-browserify'),
|
||||
os: require.resolve('os-browserify/browser'),
|
||||
path: require.resolve('path-browserify'),
|
||||
stream: require.resolve('stream-browserify'),
|
||||
vm: require.resolve('vm-browserify'),
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
|
|
@ -6,7 +6,6 @@ const baseConfig = require('./webpack.base.config.js');
|
|||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
||||
const { getIfUtils, removeEmpty } = require('webpack-config-utils');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
|
||||
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
||||
const DIST_ROOT = path.resolve(__dirname, 'dist/');
|
||||
|
@ -85,54 +84,4 @@ if (process.env.NODE_ENV === 'production') {
|
|||
});
|
||||
}
|
||||
|
||||
let plugins = [
|
||||
new DefinePlugin({
|
||||
IS_WEB: JSON.stringify(false),
|
||||
}),
|
||||
new ProvidePlugin({
|
||||
__: ['i18n.js', '__'],
|
||||
}),
|
||||
];
|
||||
|
||||
// if (hasSentryToken) {
|
||||
// plugins.push(
|
||||
// new SentryWebpackPlugin({
|
||||
// include: './dist',
|
||||
// ignoreFile: '.sentrycliignore',
|
||||
// ignore: ['node_modules', 'webpack.config.js', 'webworkers'],
|
||||
// configFile: 'sentry.properties',
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
|
||||
const renderConfig = {
|
||||
target: 'electron-renderer',
|
||||
entry: {
|
||||
ui: ['./ui/index.jsx'],
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: __dirname + '/dist/electron/webpack',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'preprocess-loader',
|
||||
options: {
|
||||
TARGET: 'app',
|
||||
ppOptions: {
|
||||
type: 'js',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins,
|
||||
};
|
||||
|
||||
module.exports = [merge(baseConfig, mainConfig), merge(baseConfig, renderConfig)];
|
||||
module.exports = merge(baseConfig, mainConfig);
|
54
webpack.electron-renderer.config.js
Normal file
54
webpack.electron-renderer.config.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
const config = require('./config');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.base.config.js');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
||||
const { getIfUtils, removeEmpty } = require('webpack-config-utils');
|
||||
|
||||
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
||||
const DIST_ROOT = path.resolve(__dirname, 'dist/');
|
||||
const NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
const { ifProduction } = getIfUtils(NODE_ENV);
|
||||
|
||||
let plugins = [
|
||||
new DefinePlugin({
|
||||
IS_WEB: JSON.stringify(false),
|
||||
}),
|
||||
new ProvidePlugin({
|
||||
__: ['i18n.js', '__'],
|
||||
}),
|
||||
];
|
||||
|
||||
const renderConfig = {
|
||||
target: 'electron-renderer',
|
||||
entry: {
|
||||
ui: ['./ui/index.jsx'],
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: __dirname + '/dist/electron/webpack',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'preprocess-loader',
|
||||
options: {
|
||||
TARGET: 'app',
|
||||
ppOptions: {
|
||||
type: 'js',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins,
|
||||
};
|
||||
|
||||
module.exports = merge(baseConfig, renderConfig);
|
Loading…
Reference in a new issue