File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -333,11 +333,11 @@ Options passed to the [AssemblyScript compiler](https://www.assemblyscript.org/c
333
333
334
334
| Name | Type | Description |
335
335
| ------------------ | ---------- | ---------- - |
336
- | ` debug ` | boolean | Enables debug information in emitted binaries . |
337
- | ` optimizeLevel ` | number | How much to focus on optimizing code . [0 - 3 ] |
338
- | ` shrinkLevel ` | number | How much to focus on shrinking code size . [0 - 2 ] |
336
+ | ` debug ` | boolean | Enables debug information in emitted binaries , enabled by default in webpack development mode . |
337
+ | ` optimizeLevel ` | number | How much to focus on optimizing code , 3 by default . [0 - 3 ] |
338
+ | ` shrinkLevel ` | number | How much to focus on shrinking code size , 1 by default . [0 - 2 ] |
339
339
| ` coverage ` | boolean | Re - optimizes until no further improvements can be made . |
340
- | ` noAssert ` | boolean | Replaces assertions with just their value without trapping . |
340
+ | ` noAssert ` | boolean | Replaces assertions with just their value without trapping , enabled by default in webpack production mode . |
341
341
| ` importMemory ` | boolean | Imports the memory provided as ' env.memory' . |
342
342
| ` noExportMemory ` | boolean | Does not export the memory as ' memory' . |
343
343
| ` initialMemory ` | number | Sets the initial memory size in pages . |
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ function loader(this: any, buffer: Buffer) {
49
49
runtime : module . type ?. startsWith ( "webassembly" ) ? "stub" : "incremental" ,
50
50
exportRuntime : ! module . type ?. startsWith ( "webassembly" ) ,
51
51
debug : this . mode === "development" ,
52
+ optimizeLevel : 3 ,
53
+ shrinkLevel : 1 ,
54
+ noAssert : this . mode === "production" ,
52
55
// user options
53
56
...userAscOptions ,
54
57
} ;
You can’t perform that action at this time.
0 commit comments