From 76a031a8c9cf30547529443b6cbfe56ed14e576f Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Tue, 17 Nov 2015 09:00:08 +0900 Subject: [PATCH] =?UTF-8?q?Build=E7=92=B0=E5=A2=83=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/main/index.js | 2 +- node_modules/boost | 1 - package.json | 2 +- webpack.config.js | 7 ++++++- 4 files changed, 8 insertions(+), 4 deletions(-) delete mode 120000 node_modules/boost diff --git a/browser/main/index.js b/browser/main/index.js index 028a2180..5d7fb878 100644 --- a/browser/main/index.js +++ b/browser/main/index.js @@ -1,4 +1,3 @@ -import React from 'react' import { Provider } from 'react-redux' // import { updateUser } from 'boost/actions' import { Router, Route, IndexRoute } from 'react-router' @@ -6,6 +5,7 @@ import MainPage from './MainPage' import HomePage from './HomePage' // import auth from 'boost/auth' import store from 'boost/store' +import React from 'react' import ReactDOM from 'react-dom' require('../styles/main/index.styl') import { openModal } from 'boost/modal' diff --git a/node_modules/boost b/node_modules/boost deleted file mode 120000 index dc598c56..00000000 --- a/node_modules/boost +++ /dev/null @@ -1 +0,0 @@ -../lib \ No newline at end of file diff --git a/package.json b/package.json index 95f50f69..36c22887 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Boost App", "main": "main.js", "scripts": { - "start": "BOOST_ENV=development electron ./main.js", + "start": "set BOOST_ENV=development&& electron ./main.js", "webpack": "webpack-dev-server --hot --inline --config webpack.config.js", "compile": "NODE_ENV=production webpack --config webpack.config.production.js", "build": "electron-packager ./ Boost --app-version=$npm_package_version $npm_package_config_platform $npm_package_config_version $npm_package_config_ignore --overwrite", diff --git a/webpack.config.js b/webpack.config.js index ce7cdf5d..ea244018 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,7 @@ var JsonpTemplatePlugin = webpack.JsonpTemplatePlugin var FunctionModulePlugin = require('webpack/lib/FunctionModulePlugin') var NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin') var ExternalsPlugin = webpack.ExternalsPlugin + var opt = { path: path.join(__dirname, 'compiled'), filename: '[name].js', @@ -11,6 +12,7 @@ var opt = { libraryTarget: 'commonjs2', publicPath: 'http://localhost:8080/assets/' } + var config = { module: { loaders: [ @@ -35,7 +37,10 @@ var config = { output: opt, resolve: { extensions: ['', '.js', '.jsx'], - packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main'] + packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main'], + alias: { + 'boost': path.resolve(__dirname, 'lib') + } }, plugins: [ new webpack.NoErrorsPlugin(),