mirror of https://github.com/lukechilds/rollup.git
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 ) );
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|