Skip to content

Commit

Permalink
fix(plugin-webpack): change preload target from electron-renderer to …
Browse files Browse the repository at this point in the history
…electron-preload (#1521)
  • Loading branch information
malept committed Feb 28, 2020
1 parent 0fd31fb commit 5f1b240
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/webpack/src/WebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/webpack/test/WebpackConfig_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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" "*"
Expand Down

0 comments on commit 5f1b240

Please sign in to comment.