Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print ids for unfinished moduleParsed and shouldTransformCachedModule…
… hooks (#4409) * Print ids for unfinished moduleParsed and shouldTransformCachedModule hooks * Fix linting * Do not swallow other errors when there are unfinished hook actions
- Loading branch information
1 parent
d4471b4
commit fda4427
Showing
50 changed files
with
236 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ export default async () => ({ | |
output: { | ||
format: 'cjs', | ||
exports: 'auto' | ||
}, | ||
} | ||
}); |
6 changes: 2 additions & 4 deletions
6
test/cli/samples/config-cwd-case-insensitive/rollup.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
var replace = require( '@rollup/plugin-replace' ); | ||
var replace = require('@rollup/plugin-replace'); | ||
|
||
module.exports = { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [ | ||
replace( { preventAssignment: true, 'ANSWER': 42 } ) | ||
] | ||
plugins: [replace({ preventAssignment: true, ANSWER: 42 })] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
const { defineConfig } = require("../../../../dist/rollup"); | ||
const { defineConfig } = require('../../../../dist/rollup'); | ||
|
||
module.exports = defineConfig({ | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
var replace = require( '@rollup/plugin-replace' ); | ||
var replace = require('@rollup/plugin-replace'); | ||
|
||
module.exports = { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [ | ||
replace( { | ||
replace({ | ||
preventAssignment: true, | ||
__ENVIRONMENT__: process.env.PRODUCTION ? 'production' : 'development', | ||
__FOO__: process.env.FOO, | ||
__SECOND__: process.env.SECOND, | ||
__KEY__: process.env.KEY | ||
} ) | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
var replace = require( '@rollup/plugin-replace' ); | ||
var replace = require('@rollup/plugin-replace'); | ||
|
||
module.exports = { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [ | ||
replace( { | ||
replace({ | ||
preventAssignment: true, | ||
__ENVIRONMENT__: process.env.PRODUCTION ? 'production' : 'development', | ||
__FOO__: process.env.FOO, | ||
__HOST__: process.env.HOST | ||
} ) | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import replace from '@rollup/plugin-replace'; | ||
|
||
export const ignoresNonDefaultExports = true | ||
export const ignoresNonDefaultExports = true; | ||
|
||
export default { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [ | ||
replace( { preventAssignment: true, 'ANSWER': 42 } ) | ||
] | ||
plugins: [replace({ preventAssignment: true, ANSWER: 42 })] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ export default { | |
output: { | ||
format: 'es' | ||
} | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
var replace = require( '@rollup/plugin-replace' ); | ||
var replace = require('@rollup/plugin-replace'); | ||
|
||
module.exports = { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [ | ||
replace( { preventAssignment: true, 'ANSWER': 42 } ) | ||
] | ||
plugins: [replace({ preventAssignment: true, ANSWER: 42 })] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ module.exports = { | |
err.frame = 'custom code frame'; | ||
this.error(err); | ||
} | ||
}, | ||
} | ||
] | ||
}; |
36 changes: 19 additions & 17 deletions
36
test/cli/samples/emit-file-multiple-dirs/rollup.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
export default { | ||
input: "main.js", | ||
output: [ | ||
{ | ||
dir: "_actual/dist1", | ||
format: "cjs" | ||
}, | ||
{ | ||
dir: "_actual/dist2", | ||
format: "es" | ||
} | ||
], | ||
plugins: [{ | ||
generateBundle() { | ||
this.emitFile({type: "asset", fileName: "myfile", source: "abc"}) | ||
} | ||
}] | ||
} | ||
input: 'main.js', | ||
output: [ | ||
{ | ||
dir: '_actual/dist1', | ||
format: 'cjs' | ||
}, | ||
{ | ||
dir: '_actual/dist2', | ||
format: 'es' | ||
} | ||
], | ||
plugins: [ | ||
{ | ||
generateBundle() { | ||
this.emitFile({ type: 'asset', fileName: 'myfile', source: 'abc' }); | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ export default { | |
reservedNamesAsProps: false | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
export default [{ | ||
input: 'main.js', | ||
output: { | ||
file: '_actual/bundle1.js', | ||
format: 'cjs', | ||
exports: 'auto' | ||
} | ||
}, { | ||
input: 'main.js', | ||
plugins: [{ | ||
resolveId(id) { | ||
throw new Error("Unexpected Exception"); | ||
export default [ | ||
{ | ||
input: 'main.js', | ||
output: { | ||
file: '_actual/bundle1.js', | ||
format: 'cjs', | ||
exports: 'auto' | ||
} | ||
}, | ||
{ | ||
input: 'main.js', | ||
plugins: [ | ||
{ | ||
resolveId(id) { | ||
throw new Error('Unexpected Exception'); | ||
} | ||
} | ||
], | ||
output: { | ||
file: '_actual/bundle2.js', | ||
format: 'cjs', | ||
exports: 'auto' | ||
} | ||
}], | ||
output: { | ||
file: '_actual/bundle2.js', | ||
format: 'cjs', | ||
exports: 'auto' | ||
} | ||
}]; | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ module.exports = { | |
output: { | ||
format: 'cjs', | ||
paths: { | ||
'foo': 'bar' | ||
foo: 'bar' | ||
}, | ||
interop: false | ||
} | ||
|
Oops, something went wrong.