File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,19 @@ interface CreateConfigOptions {
128128}
129129
130130export default function createConfig ( opts : Partial < CreateConfigOptions > ) : InputOptions {
131- const minify = opts . minify === true ;
131+ const DEV = process . env . ROLLUP_WATCH === "true" ;
132+ const minify = opts . minify === true || ! DEV ;
132133 const pkg = getPackageJSON ( ) ;
133134 const hash = minify ? hashREADME ( ) : "" ;
134135 const output_dir = opts . outDir || "dist" ;
135136
137+ console . log ( `[createConfig] Running in ${ DEV ? "development" : "production" } ` ) ;
138+ console . log ( "[createConfig] options:" ) ;
139+ console . group ( ) ;
140+ console . log ( "minify:" , minify ) ;
141+ console . log ( "outDir:" , output_dir ) ;
142+ console . groupEnd ( ) ;
143+
136144 const template = `
137145 <!DOCTYPE html>
138146 <html lang="en">
@@ -155,6 +163,7 @@ export default function createConfig(opts: Partial<CreateConfigOptions>): InputO
155163` ;
156164
157165 if ( minify ) fs . removeSync ( output_dir ) ;
166+
158167 fs . ensureFileSync ( `${ output_dir } /index.html` ) ;
159168 fs . writeFileSync (
160169 `${ output_dir } /index.html` ,
Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ const BUNDLE = process.env.BUNDLE === "true";
1010export default ( ) => {
1111 if ( ! BUNDLE )
1212 return svelteReadme ( {
13- minify : ! DEV ,
14- svelte : { compilerOptions : { immutable : true } } ,
1513 plugins : [
1614 DEV &&
1715 serve ( {
You can’t perform that action at this time.
0 commit comments