mirror of https://github.com/lukechilds/rollup.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
405 B
22 lines
405 B
module.exports = {
|
|
description: 'transformers can be asynchronous',
|
|
options: {
|
|
plugins: [
|
|
{
|
|
transform: function ( code ) {
|
|
return Promise.resolve( code.replace( 'x', 1 ) );
|
|
}
|
|
},
|
|
{
|
|
transform: function ( code ) {
|
|
return code.replace( '1', 2 );
|
|
}
|
|
},
|
|
{
|
|
transform: function ( code ) {
|
|
return Promise.resolve( code.replace( '2', 3 ) );
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|