Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
[DAWN] Upgrade to webpack 4 (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinji authored and kevinmasd committed Mar 7, 2018
1 parent 35ac1b1 commit a4b773f
Show file tree
Hide file tree
Showing 5 changed files with 2,136 additions and 314 deletions.
4 changes: 1 addition & 3 deletions dawn/main/networking/Ansible.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import protobuf from 'protobufjs';
import _ from 'lodash';

import RendererBridge from '../RendererBridge';
import {
updateConsole,
} from '../../renderer/actions/ConsoleActions';
import { updateConsole } from '../../renderer/actions/ConsoleActions';
import {
ansibleDisconnect,
notifyReceive,
Expand Down
17 changes: 9 additions & 8 deletions dawn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"start": "better-npm-run start",
"build": "better-npm-run build",
"lint": "eslint .",
"watch": "webpack --watch --progress",
"test": "mocha --compilers js:babel-core/register --recursive renderer/**/test/*.test.js",
"watch": "webpack --mode development --watch --progress",
"test": "mocha --require babel-core/register --recursive renderer/**/test/*.test.js",
"release": "node release.js"
},
"betterScripts": {
Expand All @@ -25,34 +25,35 @@
}
},
"build": {
"command": "mkdir -p ./build && cp ../ansible-protos/*.proto ./build && webpack --progress",
"command": "mkdir -p ./build && cp ../ansible-protos/*.proto ./build && webpack --mode production --progress",
"env": {
"NODE_ENV": "production"
}
}
},
"devDependencies": {
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
"babel-loader": "7.1.3",
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-3": "6.24.1",
"better-npm-run": "0.1.0",
"chai": "4.1.2",
"electron-devtools-installer": "2.2.3",
"electron-packager": "^10.1.1",
"eslint": "4.16.0",
"eslint": "4.18.1",
"eslint-config-airbnb": "16.1.0",
"eslint-loader": "1.9.0",
"eslint-loader": "2.0.0",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-react": "7.5.1",
"fs-extra": "5.0.0",
"jszip": "3.1.5",
"minimist": "1.2.0",
"mocha": "5.0.0",
"webpack": "3.10.0",
"zip-webpack-plugin": "2.1.0"
"webpack": "4.1.0",
"webpack-cli": "2.0.10",
"zip-webpack-plugin": "3.0.0"
},
"dependencies": {
"brace": "0.11.0",
Expand Down
3 changes: 2 additions & 1 deletion dawn/renderer/components/DNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
Navbar,
ButtonToolbar,
ButtonGroup,
Label } from 'react-bootstrap';
Label,
} from 'react-bootstrap';
import ConfigBox from './ConfigBox';
import UpdateBox from './UpdateBox';
import StatusLabel from './StatusLabel';
Expand Down
16 changes: 2 additions & 14 deletions dawn/webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import path from 'path';
import webpack from 'webpack';
import { version } from './package.json';

const target = 'electron';
const modules = {
rules: [
{
Expand All @@ -19,13 +16,6 @@ const modules = {
],
};

const plugins = [
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.DefinePlugin({
VERSION: JSON.stringify(version),
}),
];

export default [
{
entry: './renderer/index.js',
Expand All @@ -34,22 +24,20 @@ export default [
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
},
target,
target: 'electron-renderer',
module: modules,
plugins,
},
{
entry: './main/main-process.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'main.js',
},
target,
target: 'electron-main',
node: {
__dirname: false,
__filename: false,
},
module: modules,
plugins,
},
];
Loading

0 comments on commit a4b773f

Please sign in to comment.