@dcloudio/uni-mp-toutiao 3.0.0-alpha-4030320241109001 → 3.0.0-alpha-4030320241117001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,14 +2,12 @@
2
2
 
3
3
  var uniCliShared = require('@dcloudio/uni-cli-shared');
4
4
  var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
5
- var path = require('path');
6
5
  var uniMpCompiler = require('@dcloudio/uni-mp-compiler');
7
6
  var compilerCore = require('@vue/compiler-core');
8
7
 
9
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
9
 
11
10
  var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
12
- var path__default = /*#__PURE__*/_interopDefault(path);
13
11
 
14
12
  var setting = {
15
13
  urlCheck: false,
@@ -81,6 +79,9 @@ const nodeTransforms = [
81
79
  uniCliShared.transformMatchMedia,
82
80
  uniCliShared.transformComponentLink,
83
81
  ];
82
+ if (process.env.UNI_APP_X === 'true') {
83
+ nodeTransforms.push(uniCliShared.transformMPBuiltInTag, uniCliShared.transformDirection);
84
+ }
84
85
  const compilerOptions = {
85
86
  nodeTransforms,
86
87
  };
@@ -98,15 +99,19 @@ const miniProgram = {
98
99
  dir: COMPONENTS_DIR,
99
100
  vShow: uniCliShared.COMPONENT_CUSTOM_HIDDEN_BIND,
100
101
  },
102
+ filter: {
103
+ lang: 'sjs',
104
+ setStyle: true,
105
+ },
101
106
  };
102
107
  const options = {
103
108
  cdn: 4,
104
109
  vite: {
105
110
  inject: {
106
- uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
111
+ uni: [initMiniProgramPlugin.resolveMiniProgramRuntime(__dirname, 'uni.api.esm.js'), 'default'],
107
112
  },
108
113
  alias: {
109
- 'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
114
+ 'uni-mp-runtime': initMiniProgramPlugin.resolveMiniProgramRuntime(__dirname, 'uni.mp.esm.js'),
110
115
  },
111
116
  copyOptions: {
112
117
  assets: [COMPONENTS_DIR],
@@ -131,18 +136,14 @@ const options = {
131
136
  config: ['project.tt.json'],
132
137
  source,
133
138
  },
134
- template: Object.assign(Object.assign({}, miniProgram), { customElements, filter: {
135
- extname: '.sjs',
136
- lang: 'sjs',
137
- generate(filter, filename) {
139
+ template: Object.assign(Object.assign({}, miniProgram), { customElements, filter: Object.assign(Object.assign({}, miniProgram.filter), { extname: '.sjs', lang: 'sjs', generate(filter, filename) {
138
140
  if (filename) {
139
141
  return `<sjs src="${filename}.sjs" module="${filter.name}"/>`;
140
142
  }
141
143
  return `<sjs module="${filter.name}">
142
144
  ${filter.code}
143
145
  </sjs>`;
144
- },
145
- }, extname: '.ttml', compilerOptions }),
146
+ } }), extname: '.ttml', compilerOptions }),
146
147
  style: {
147
148
  extname: '.ttss',
148
149
  },