fix(plugin-webpack): change preload target from electron-renderer to electron-preload (#1521)

This commit is contained in:
Mark Lee 2020-02-28 11:14:53 -08:00 коммит произвёл GitHub
Родитель 0fd31fb09e
Коммит 5f1b240f2b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -110,7 +110,7 @@
"@types/semver": "^7.1.0",
"@types/sinon": "^7.5.1",
"@types/username": "^3.0.0",
"@types/webpack": "^4.41.5",
"@types/webpack": "^4.41.7",
"@types/webpack-dev-middleware": "^3.7.0",
"@types/webpack-hot-middleware": "^2.25.0",
"@types/webpack-merge": "^4.1.5",

Просмотреть файл

@ -175,7 +175,7 @@ export default class WebpackConfigGenerator {
return webpackMerge.smart({
devtool: 'inline-source-map',
target: 'electron-renderer',
target: 'electron-preload',
mode: this.mode,
entry: prefixedEntries.concat([
entryPoint.js,

Просмотреть файл

@ -220,7 +220,7 @@ describe('WebpackConfigGenerator', () => {
entryPoint,
entryPoint.preload!,
);
expect(webpackConfig.target).to.equal('electron-renderer');
expect(webpackConfig.target).to.equal('electron-preload');
expect(webpackConfig.mode).to.equal('development');
expect(webpackConfig.entry).to.deep.equal(['preloadScript.js']);
expect(webpackConfig.output).to.deep.equal({

Просмотреть файл

@ -1422,10 +1422,10 @@
"@types/source-list-map" "*"
source-map "^0.6.1"
"@types/webpack@*", "@types/webpack@^4.41.5":
version "4.41.6"
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.6.tgz#c76afbdef59159d12e3e1332dc264b75574722a2"
integrity sha512-iWRpV5Ej+8uKrgxp6jXz3v7ZTjgtuMXY+rsxQjFNU0hYCnHkpA7vtiNffgxjuxX4feFHBbz0IF76OzX2OqDYPw==
"@types/webpack@*", "@types/webpack@^4.41.7":
version "4.41.7"
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.7.tgz#22be27dbd4362b01c3954ca9b021dbc9328d9511"
integrity sha512-OQG9viYwO0V1NaNV7d0n79V+n6mjOV30CwgFPIfTzwmk8DHbt+C4f2aBGdCYbo3yFyYD6sjXfqqOjwkl1j+ulA==
dependencies:
"@types/anymatch" "*"
"@types/node" "*"