Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
No, no, this will be the final release 0.2.0
Browse files Browse the repository at this point in the history
Former-commit-id: 43bbbe0
  • Loading branch information
sentialx committed Dec 17, 2017
1 parent 156c8f8 commit 4bba7fd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"start": "cross-env NODE_ENV=dev electron main.js",
"watch": "npm run build:dev && webpack-dev-server --hot --inline --port 8080 --colors --progress",
"build:dev": "rimraf build && webpack",
"build:production": "rimraf build && rimraf dist && cross-env NODE_ENV=production webpack --define process.env.NODE_ENV=production --progress --colors",
"build:dev": "rimraf public/build && webpack",
"build:production": "rimraf public/build && rimraf dist && cross-env NODE_ENV=production webpack --define process.env.NODE_ENV=production --progress --colors",
"compile:win64": "npm run build:production && electron-packager . --platform=win32 --arch=x64 Wexond --asar --overwrite --out=dist",
"compile:win32": "npm run build:production && electron-packager . --platform=win32 --arch=ia32 Wexond --asar --overwrite --out=dist",
"compile:linux64": "npm run build:production && electron-packager . --platform=linux --arch=x64 Wexond --asar --overwrite --out=dist",
Expand Down
2 changes: 1 addition & 1 deletion public/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<script>
if (process.env.NODE_ENV !== 'dev') {
loadScripts(['build/app.bundle.js'])
loadScripts(['wexond://build/app.bundle.js'])
} else {
loadScripts(['http://localhost:8080/build/app.bundle.js', 'http://localhost:8080/webpack-dev-server.js'])
}
Expand Down
2 changes: 1 addition & 1 deletion public/history/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
}
if (window.env !== 'dev') {
loadScripts(['build/history.bundle.js'])
loadScripts(['wexond://build/history.bundle.js'])
} else {
loadScripts(['http://localhost:8080/build/history.bundle.js', 'http://localhost:8080/webpack-dev-server.js'])
}
Expand Down
20 changes: 8 additions & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ let config = {
publicPath: 'http://localhost:8080/build/'
},

output: {
path: join(__dirname, 'public', 'build'),
filename: '[name].bundle.js'
},

module: {
rules: [
{
Expand Down Expand Up @@ -78,31 +83,22 @@ if (process.env.NODE_ENV === 'production') {
let appConfig = {
target: 'electron',
devtool: 'eval-source-map',
output: {
path: join(__dirname, 'public', 'app', 'build'),
filename: '[name].bundle.js'
},

entry: {
app: './src/app-bootstrap.jsx'
}
}

let historyConfig = {
let appletsConfig = {
target: 'web',
devtool: 'eval-source-map',

output: {
path: join(__dirname, 'public', 'history', 'build'),
filename: '[name].bundle.js'
},

entry: {
history: './src/history-bootstrap.jsx'
}
}

appConfig = Object.assign(appConfig, config)
historyConfig = Object.assign(historyConfig, config)
appletsConfig = Object.assign(appletsConfig, config)

module.exports = [appConfig, historyConfig]
module.exports = [appConfig, appletsConfig]

0 comments on commit 4bba7fd

Please sign in to comment.