Skip to content

Commit 382b096

Browse files
committed
build: fix prod release build failure, remote functions will not be minified
1 parent 8f92a14 commit 382b096

File tree

2 files changed

+7
-27
lines changed

2 files changed

+7
-27
lines changed

gulpfile.js/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function makeDistAll() {
129129

130130
function makeJSDist() {
131131
return src(['src/**/*.js', '!src/**/unittest-files/**/*', "!src/thirdparty/prettier/**/*",
132-
"!src/thirdparty/no-minify/**/*"])
132+
"!src/thirdparty/no-minify/**/*", "!src/LiveDevelopment/BrowserScripts/RemoteFunctions.js"])
133133
.pipe(minify({
134134
ext:{
135135
min:'.js'
@@ -156,8 +156,11 @@ function makeJSPrettierDist() {
156156
}
157157

158158
function makeNonMinifyDist() {
159-
return src(["src/thirdparty/no-minify/**/*"])
160-
.pipe(dest('dist/thirdparty/no-minify'));
159+
// we dont minify remote functions as its in live preview context and the prod minify is stripping variables
160+
// used by plugins in live preview. so we dont minify this for now.
161+
return src(["src/thirdparty/no-minify/**/*",
162+
"src/LiveDevelopment/BrowserScripts/RemoteFunctions.js"], {base: 'src'})
163+
.pipe(dest('dist'));
161164
}
162165

163166
function makeDistNonJS() {

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
/*
2-
* GNU AGPL-3.0 License
3-
*
4-
* Copyright (c) 2021 - present core.ai . All rights reserved.
5-
* Original work Copyright (c) 2012 - 2021 Adobe Systems Incorporated. All rights reserved.
6-
*
7-
* This program is free software: you can redistribute it and/or modify it
8-
* under the terms of the GNU Affero General Public License as published by
9-
* the Free Software Foundation, either version 3 of the License, or
10-
* (at your option) any later version.
11-
*
12-
* This program is distributed in the hope that it will be useful, but WITHOUT
13-
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14-
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
15-
* for more details.
16-
*
17-
* You should have received a copy of the GNU Affero General Public License
18-
* along with this program. If not, see https://opensource.org/licenses/AGPL-3.0.
19-
*
20-
*/
21-
22-
/*jslint forin: true */
23-
/*theseus instrument: false */
24-
1+
// this is a single non-minified file sent to browser preview. keep this light. add features as extensions
252
/**
263
* RemoteFunctions define the functions to be executed in the browser. This
274
* modules should define a single function that returns an object of all

0 commit comments

Comments
 (0)