百度智能小程序

@megalo/targetplatform 设置成 swanmini-css-extract-plugin 提取文件后缀改成百度智能小程序的 css

  1. const createMegaloTarget = require( '@megalo/target' )
  2. const compiler = require( '@megalo/template-compiler' )
  3. const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' )
  4. module.exports = {
  5. target: createMegaloTarget( {
  6. compiler,
  7. platform: 'swan'
  8. } ),
  9. plugins: [
  10. new MiniCssExtractPlugin( {
  11. filename: 'static/css/[name].csss',
  12. } )
  13. // ...
  14. ]
  15. // ... 其他配置
  16. }