File: main_wasm.go

package info (click to toggle)
golang-github-evanw-esbuild 0.25.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 10,184 kB
  • sloc: javascript: 28,602; makefile: 856; sh: 17
file content (29 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//go:build js && wasm
// +build js,wasm

package main

import (
	"github.com/evanw/esbuild/internal/logger"
)

// Remove this code from the WebAssembly binary to reduce size. This only removes 0.4mb of stuff.

func createTraceFile(osArgs []string, traceFile string) func() {
	logger.PrintErrorToStderr(osArgs, "The \"--trace\" flag is not supported when using WebAssembly")
	return nil
}

func createHeapFile(osArgs []string, heapFile string) func() {
	logger.PrintErrorToStderr(osArgs, "The \"--heap\" flag is not supported when using WebAssembly")
	return nil
}

func createCpuprofileFile(osArgs []string, cpuprofileFile string) func() {
	logger.PrintErrorToStderr(osArgs, "The \"--cpuprofile\" flag is not supported when using WebAssembly")
	return nil
}

func isServeUnsupported() bool {
	return true
}