UNPKG

@morjs/plugin-compiler-bytedance

Version:

mor complier plugin for bytedance miniprogram

41 lines 1.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.templateDirectives = exports.templateSingleTagNames = exports.supportGlobalComponents = exports.projectConfigFiles = exports.compileScriptTarget = exports.compileModuleKind = exports.defaultOutputDir = exports.isSupportSjsContent = exports.sjsModuleAttrName = exports.sjsSrcAttrName = exports.sjsTagName = exports.defaultConditionalFileExt = exports.resolveMainFields = exports.globalObject = exports.fileType = exports.targetDescription = exports.target = void 0; const utils_1 = require("@morjs/utils"); exports.target = 'bytedance'; exports.targetDescription = '字节小程序'; exports.fileType = { template: '.ttml', style: '.ttss', config: '.json', script: '.js', sjs: '.sjs' }; exports.globalObject = 'tt'; // 字节的小程序组件规范有些特别,需要 // miniprogramType 指定为 tt-npm 且 // 需要在 exports 字段中指定 pages 和 components // https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/framework/npm/ // 后续要看下是否需要兼容字节小程序原生的组件支持 exports.resolveMainFields = ['bytedance', 'main']; exports.defaultConditionalFileExt = '.tt'; exports.sjsTagName = 'sjs'; exports.sjsSrcAttrName = 'src'; exports.sjsModuleAttrName = 'module'; exports.isSupportSjsContent = true; exports.defaultOutputDir = 'dist/bytedance'; exports.compileModuleKind = utils_1.CompileModuleKind.CommonJS; exports.compileScriptTarget = utils_1.CompileScriptTarget.ES5; exports.projectConfigFiles = ['project.tt.json', 'project.config.json']; exports.supportGlobalComponents = false; exports.templateSingleTagNames = ['import', 'include']; exports.templateDirectives = { if: 'tt:if', elseIf: 'tt:elif', else: 'tt:else', for: 'tt:for', forItem: 'tt:for-item', forIndex: 'tt:for-index', key: 'tt:key' }; //# sourceMappingURL=constants.js.map