Skip to content

Commit f949d11

Browse files
committed
fix(pixorePath): use first pixorePath
1 parent 1b1c745 commit f949d11

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ config.isTest = process.env.NODE_ENV === 'test'
1414
config.isProd = process.env.NODE_ENV === 'production'
1515
config.isDev = process.env.NODE_ENV === 'development'
1616
config.PORT = Number(process.env.PORT) || Number(flags['--port']) || 80
17-
config.PIXORE_PATH = config.isProd ? (mainPackage.pixorePath || '') : ''
17+
config.PIXORE_PATH = config.isProd ? (process.env.PIXORE_PATH || mainPackage.pixorePath || '') : ''
1818
config.ROOT_PATH = appRoot
1919
config.ESLINT_PATH = path.join(config.ROOT_PATH, '.eslintrc.js')
2020
config.BUILD_PATH = path.join(config.ROOT_PATH, 'build')

src/config/webpack.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const path = require('path')
2-
const debug = require('debug')('pixore')
2+
const debug = require('debug')('pixore:front-scripts')
33
const webpack = require('webpack')
44
const HtmlWebpackPlugin = require('html-webpack-plugin')
55
const UglifyJSPlugin = require('html-webpack-plugin')
66
const ExtractTextPlugin = require('extract-text-webpack-plugin')
77
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin')
8-
const { isProd, MAIN_TEMPLATE, APP_PATH, BUILD_PATH, PIXORE_PATH, ROOT_PATH, ESLINT_PATH } = require('./environment')
8+
const { isProd, isDev, MAIN_TEMPLATE, APP_PATH, BUILD_PATH, PIXORE_PATH, ROOT_PATH, ESLINT_PATH } = require('./environment')
99

1010
debug.namespace = ''
1111

@@ -67,7 +67,7 @@ const modules = {
6767
}
6868

6969
const resolve = {
70-
extensions: ['', '.js', '.css', '.styl', '.jade'],
70+
extensions: ['.js', '.css', '.styl', '.jade'],
7171
modules: [
7272
path.join(__dirname, '../../node_modules'),
7373
path.join(ROOT_PATH, 'node_modules')
@@ -136,9 +136,8 @@ if (isProd) {
136136
)
137137
}
138138

139-
debug(resolve)
140-
141139
module.exports = {
140+
watch: isDev,
142141
devtool,
143142
entry,
144143
output,

src/scripts/start.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ process.env.NODE_ENV = 'development'
22
process.env.DEBUG = 'pixore:front-scripts, pixore:dev, pixore:error'
33

44
const Promise = require('bluebird')
5-
const debug = require('debug')('pixore')
5+
const debug = require('debug')('pixore:front-scripts')
66
const historyApiFallback = require('connect-history-api-fallback')
77
const WebpackDevServer = require('webpack-dev-server')
88
const chalk = require('chalk')
@@ -22,6 +22,7 @@ const runDevServer = compiler => new WebpackDevServer(compiler, {
2222
clientLogLevel: 'none',
2323
contentBase: false,
2424
hot: true,
25+
quiet: true,
2526
publicPath: config.output.publicPath,
2627
watchOptions: {
2728
ignored: /node_modules/

0 commit comments

Comments
 (0)