百度智能小程序

优质
小牛编辑
135浏览
2023-12-01

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

const createMegaloTarget = require( '@megalo/target' )
const compiler = require( '@megalo/template-compiler' )
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' )

module.exports = {
  target: createMegaloTarget( {
    compiler,
    platform: 'swan'
  } ),

  plugins: [
    new MiniCssExtractPlugin( {
      filename: 'static/css/[name].csss',
    } )
    // ...
  ]

  // ... 其他配置
}