Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c69860

Browse filesBrowse files
Dave Brophydmitshur
Dave Brophy
andcommitted
compiler: Minify prelude with UglifyJS 3.
Use uglify-es 3.3.9 via https://skalman.github.io/UglifyJS-online/ with default options. Currently, it needs to be manually updated whenever prelude changes. It's not very often. When that changes, it can be automated via #765. Resolves #762. Closes #761. Co-authored-by: Dmitri Shuralyov <dmitri@shuralyov.com>
1 parent 4e9f423 commit 9c69860
Copy full SHA for 9c69860

File tree

Expand file treeCollapse file tree

3 files changed

+10
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-2
lines changed

‎compiler/compiler.go

Copy file name to clipboardExpand all lines: compiler/compiler.go
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ func WriteProgramCode(pkgs []*Archive, w *SourceMapFilter) error {
154154
if _, err := w.Write([]byte("\"use strict\";\n(function() {\n\n")); err != nil {
155155
return err
156156
}
157-
if _, err := w.Write(removeWhitespace([]byte(prelude.Prelude), minify)); err != nil {
157+
preludeJS := prelude.Prelude
158+
if minify {
159+
preludeJS = prelude.Minified
160+
}
161+
if _, err := io.WriteString(w, preludeJS); err != nil {
158162
return err
159163
}
160164
if _, err := w.Write([]byte("\n")); err != nil {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.