Skip to content

Commit 935456f

Browse files
authored
Merge pull request #234 from mgusmano/ext-react-6.7.x
plugin
2 parents 37fee85 + b855b6b commit 935456f

File tree

4 files changed

+76
-69
lines changed

4 files changed

+76
-69
lines changed

packages/ext-react-webpack-plugin/dist/artifacts.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ext-react-webpack-plugin/dist/pluginUtil.js

Lines changed: 38 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ext-react-webpack-plugin/src/artifacts.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,15 @@ export function createAppJson( theme, packages, toolkit, options, output ) {
142142
"overrides",
143143
"jsdom-environment.js"
144144
],
145+
// "language": {
146+
// "js": {
147+
// "output": "ES5"
148+
// }
149+
// },
145150
"packages": {
146151
"dir": [
147152
nodeModulePath + "node_modules/@sencha",
148-
nodeModulePath + "ext-react/packages"
153+
nodeModulePath + toolkit + "/packages"
149154
]
150155
},
151156
output: {

packages/ext-react-webpack-plugin/src/pluginUtil.js

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,30 @@ export function _compilation(compiler, compilation, vars, options) {
107107
compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration.tap(`ext-html-generation`,(data) => {
108108
logv(options,'HOOK ext-html-generation')
109109
const path = require('path')
110-
var outputPath = ''
111-
if (compiler.options.devServer) {
112-
if (compiler.outputPath === '/') {
113-
outputPath = path.join(compiler.options.devServer.contentBase, outputPath)
114-
}
115-
else {
116-
if (compiler.options.devServer.contentBase == undefined) {
117-
outputPath = 'build'
118-
}
119-
else {
120-
outputPath = ''
121-
}
122-
}
123-
}
124-
else {
125-
outputPath = 'build'
126-
}
127-
outputPath = outputPath.replace(process.cwd(), '').trim()
128-
var jsPath = path.join(outputPath, vars.extPath, 'ext.js')
129-
var cssPath = path.join(outputPath, vars.extPath, 'ext.css')
110+
111+
//var outputPath = ''
112+
// if (compiler.options.devServer) {
113+
// if (compiler.outputPath === '/') {
114+
// outputPath = path.join(compiler.options.devServer.contentBase, outputPath)
115+
// }
116+
// else {
117+
// if (compiler.options.devServer.contentBase == undefined) {
118+
// outputPath = 'build'
119+
// }
120+
// else {
121+
// outputPath = ''
122+
// }
123+
// }
124+
// }
125+
// else {
126+
// outputPath = 'build'
127+
// }
128+
// outputPath = outputPath.replace(process.cwd(), '').trim()
129+
//var jsPath = path.join(outputPath, vars.extPath, 'ext.js')
130+
//var cssPath = path.join(outputPath, vars.extPath, 'ext.css')
131+
132+
var jsPath = path.join(vars.extPath, 'ext.js')
133+
var cssPath = path.join(vars.extPath, 'ext.css')
130134
data.assets.js.unshift(jsPath)
131135
data.assets.css.unshift(cssPath)
132136
log(vars.app + `Adding ${jsPath} and ${cssPath} to index.html`)
@@ -208,7 +212,6 @@ export async function emit(compiler, compilation, vars, options, callback) {
208212
await _buildExtBundle(app, compilation, outputPath, parms, options)
209213
vars.watchStarted = true
210214
}
211-
212215
callback()
213216
}
214217
else {
@@ -301,9 +304,8 @@ export function _prepareForBuild(app, vars, options, output, compilation) {
301304
log(app + 'Building Ext bundle at: ' + bundleDir)
302305
}
303306
else {
304-
vars.rebuild = true
307+
vars.rebuild = false
305308
log(app + 'Ext rebuild NOT needed')
306-
log(app + 'but done')
307309
}
308310
}
309311
catch(e) {
@@ -384,7 +386,6 @@ export function _done(vars, options) {
384386

385387
//**********
386388
export async function executeAsync (app, command, parms, opts, compilation, options) {
387-
388389
try {
389390
//const DEFAULT_SUBSTRS = ['[INF] Loading', '[INF] Processing', '[LOG] Fashion build complete', '[ERR]', '[WRN]', "[INF] Server", "[INF] Writing", "[INF] Loading Build", "[INF] Waiting", "[LOG] Fashion waiting"];
390391
const DEFAULT_SUBSTRS = ["[INF] xServer", '[INF] Loading', '[INF] Append', '[INF] Processing', '[INF] Processing Build', '[LOG] Fashion build complete', '[ERR]', '[WRN]', "[INF] Writing", "[INF] Loading Build", "[INF] Waiting", "[LOG] Fashion waiting"];
@@ -419,9 +420,6 @@ export async function executeAsync (app, command, parms, opts, compilation, opti
419420
logv(options, `touching ${filename}`)
420421
resolve(0)
421422
}
422-
// if (data && data.toString().match(/waiting for changes\.\.\./)) {
423-
// resolve(0)
424-
// }
425423
else {
426424
if (substrings.some(function(v) { return data.indexOf(v) >= 0; })) {
427425
str = str.replace("[INF]", "")

0 commit comments

Comments
 (0)