@@ -105,7 +105,7 @@ export class Bootstrap {
105
105
const projectContext = await this . initProjectConfig ( ) ;
106
106
const serverContext = await this . initServerConfig ( ) ;
107
107
const deps = this . configureScripts ( projectContext ) ;
108
- this . initBrowserList ( ) ;
108
+ this . initSharedConfigFiles ( ) ;
109
109
return Promise . resolve (
110
110
new InitResolve ( 'project' , serverContext , projectContext , deps )
111
111
) ;
@@ -248,13 +248,26 @@ export class Bootstrap {
248
248
249
249
/**
250
250
* Create a default production ready (90%+ global coverage)
251
- * browserlistrc file for your project.
251
+ * browserlistrc file for your project and a postcss.config.js
252
+ * file.
252
253
*/
253
- private initBrowserList ( ) : void {
254
+ private initSharedConfigFiles ( ) : void {
254
255
fs . writeFileSync (
255
256
path . resolve ( this . cwd , '.browserslistrc' ) ,
256
257
'> 0.25%, not dead'
257
258
) ;
259
+ fs . writeFileSync (
260
+ path . resolve ( this . cwd , 'postcss.config.js' ) ,
261
+ `/* eslint-disable global-require, import/no-extraneous-dependencies */
262
+ module.exports = {
263
+ // You can add more plugins and other postcss config
264
+ // For more info see
265
+ // <https://github.com/postcss/postcss-loader#configuration>
266
+ // There is no need to use cssnano, webpack takes care of it!
267
+ plugins: [require('autoprefixer')],
268
+ };
269
+ `
270
+ ) ;
258
271
}
259
272
260
273
/**
0 commit comments