File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,7 @@ export const ERROR_WARNINGS_ENABLED_LANGUAGE_OUT_INVALID =
30
30
* @param format
31
31
* @return boolean
32
32
*/
33
- export const isESMFormat = ( format ?: ModuleFormat ) : boolean => {
34
- // TODO: remove `| 'esm'` when rollup upgrades its typings
35
- return format === 'esm' || format === 'es' ;
36
- } ;
33
+ export const isESMFormat = ( format ?: ModuleFormat ) : boolean => format === 'esm' || format === 'es' ;
37
34
38
35
/**
39
36
* Throw Errors if compile options will result in unexpected behaviour.
Original file line number Diff line number Diff line change @@ -128,11 +128,7 @@ export default class ExportTransform extends Transform implements TransformInter
128
128
* @return modified input source with window scoped references.
129
129
*/
130
130
public async preCompilation ( code : string ) : Promise < TransformSourceDescription > {
131
- if ( this . outputOptions === null ) {
132
- this . context . warn (
133
- 'Rollup Plugin Closure Compiler, OutputOptions not known before Closure Compiler invocation.' ,
134
- ) ;
135
- } else if ( isESMFormat ( this . outputOptions . format ) ) {
131
+ if ( isESMFormat ( this . outputOptions . format ) ) {
136
132
await this . deriveExports ( code ) ;
137
133
const source = new MagicString ( code ) ;
138
134
@@ -171,11 +167,7 @@ export default class ExportTransform extends Transform implements TransformInter
171
167
* @return Promise containing the repaired source
172
168
*/
173
169
public async postCompilation ( code : string ) : Promise < TransformSourceDescription > {
174
- if ( this . outputOptions === null ) {
175
- this . context . warn (
176
- 'Rollup Plugin Closure Compiler, OutputOptions not known before Closure Compiler invocation.' ,
177
- ) ;
178
- } else if ( isESMFormat ( this . outputOptions . format ) ) {
170
+ if ( isESMFormat ( this . outputOptions . format ) ) {
179
171
const source = new MagicString ( code ) ;
180
172
const program = parse ( code ) ;
181
173
let collectedExportsToAppend : Map < string | null , Array < string > > = new Map ( ) ;
You can’t perform that action at this time.
0 commit comments