我已经定义了一个名为build-prod
的构建过程,如下所示:
现在,当我运行此构建时:
它产生以下文件:
但是当我复制 exact命令时:
D:\Tools\nodejs\node.exe D:\Tools\nodejs\node_modules\npm\bin\npm-cli.js run build-prod --scripts-prepend-node-path=auto
并在终端中运行它:
它产生以下文件:
发生了什么事?
@edit通过终端3.js
运行包含webpackJsonp
,并且app.js
将我的es6类转换为以下结构:
return function(e, t, n) {t && s(e.prototype, t), n && s(e, n);}(e, [
{
key: 'initState',
value: function(e) {this.state = e || {commentHidePersistor: {}};},
},
{
key: 'hideComments',
value: function(e, t, n, r) {
e.textContent = '[+]', t.classList.add(
'collapsed'), this.state.commentHidePersistor[n] = this.state.commentHidePersistor[n] ||
{collapsedThings: {}}, this.state.commentHidePersistor[n].lastUpdate = (new Date).getTime(), this.state.commentHidePersistor[n].collapsedThings[r] = !0, this.commentsStorage.saveAll(
this.state), this.isElementInViewport(t) ||
this.scrollToParent(t);
},
},
通过intellij app.js
运行时保持es6格式:
}, i = new class {
constructor(t) {this.commentsStorage = t;}
initState(t) {this.state = t || {commentHidePersistor: {}};}
hideComments(t, e, n, o) {
t.textContent = '[+]', e.classList.add(
'collapsed'), this.state.commentHidePersistor[n] = this.state.commentHidePersistor[n] ||
{collapsedThings: {}}, this.state.commentHidePersistor[n].lastUpdate = (new Date).getTime(), this.state.commentHidePersistor[n].collapsedThings[o] = !0, this.commentsStorage.saveAll(
this.state), this.isElementInViewport(e) || this.scrollToParent(e);
}