支付宝小程序

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

@megalo/targetplatform 设置成 alipaymini-css-extract-plugin 提取文件后缀改成支付宝小程序的 acss

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

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

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

  // ... 其他配置
}