chore: add debugBundle to write out bundle
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
NexePatch
|
||||
} from './options'
|
||||
import cli from './steps/cli'
|
||||
import bundle from './bundling/fuse'
|
||||
import bundle from './steps/bundle'
|
||||
import download from './steps/download'
|
||||
import artifacts from './steps/artifacts'
|
||||
import patches from './patches'
|
||||
|
||||
@@ -38,6 +38,7 @@ export interface NexeOptions {
|
||||
verbose?: boolean
|
||||
info?: boolean
|
||||
ico?: string
|
||||
debugBundle?: boolean
|
||||
warmup?: string
|
||||
compress?: boolean
|
||||
clean?: boolean
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NexeCompiler } from '../compiler'
|
||||
import { FuseBox, JSONPlugin, CSSPlugin, HTMLPlugin, QuantumPlugin } from 'fuse-box'
|
||||
import { readFileAsync } from '../util'
|
||||
import { readFileAsync, writeFileAsync } from '../util'
|
||||
//import NativeModulePlugin from './fuse-native-module-plugin'
|
||||
|
||||
function createBundle(filename: string, options: { name: string; minify: any; cwd: string }) {
|
||||
@@ -53,5 +53,9 @@ export default async function bundle(compiler: NexeCompiler, next: any) {
|
||||
name: compiler.options.name,
|
||||
minify: compiler.options.compress
|
||||
})
|
||||
if (compiler.options.debugBundle) {
|
||||
await writeFileAsync(compiler.options.debugBundle, compiler.input)
|
||||
}
|
||||
|
||||
return next()
|
||||
}
|
||||
Reference in New Issue
Block a user