@@ -25,6 +25,7 @@ const imageSize = require('image-size');
2525const path = require ( 'path' ) ;
2626const version = require ( '../../../../package.json' ) . version ;
2727const denodeify = require ( 'denodeify' ) ;
28+ const defaults = require ( '../../../defaults' ) ;
2829
2930const {
3031 sep : pathSeparator ,
@@ -91,6 +92,10 @@ const validateOpts = declareOpts({
9192 type : 'array' ,
9293 default : [ 'png' ] ,
9394 } ,
95+ platforms : {
96+ type : 'array' ,
97+ default : defaults . platforms ,
98+ } ,
9499 watch : {
95100 type : 'boolean' ,
96101 default : false ,
@@ -126,6 +131,7 @@ type Options = {
126131 getTransformOptions ?: GetTransformOptions < * > ,
127132 extraNodeModules : { } ,
128133 assetExts : Array < string > ,
134+ platforms : Array < string > ,
129135 watch : boolean ,
130136 assetServer : AssetServer ,
131137 transformTimeoutInterval : ?number ,
@@ -200,6 +206,7 @@ class Bundler {
200206 watch : opts . watch ,
201207 minifyCode : this . _transformer . minify ,
202208 moduleFormat : opts . moduleFormat ,
209+ platforms : opts . platforms ,
203210 polyfillModuleNames : opts . polyfillModuleNames ,
204211 projectRoots : opts . projectRoots ,
205212 resetCache : opts . resetCache ,
0 commit comments