@blocklet/pages-kit-block-studio 0.1.35 → 0.1.36

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.
@@ -132,7 +132,7 @@ function initBlockStudioPlugins(options) {
132
132
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
133
133
  config(_config) {
134
134
  return __awaiter(this, void 0, void 0, function* () {
135
- var _a;
135
+ var _a, _b, _c, _d;
136
136
  const filterModules = process.argv.includes('--filter')
137
137
  ? (_a = process.argv[process.argv.indexOf('--filter') + 1]) === null || _a === void 0 ? void 0 : _a.split(',')
138
138
  : null;
@@ -160,30 +160,25 @@ function initBlockStudioPlugins(options) {
160
160
  }));
161
161
  return {
162
162
  plugins,
163
- build: Object.assign({ cssCodeSplit: false, lib: {
163
+ build: Object.assign(Object.assign({}, _config === null || _config === void 0 ? void 0 : _config.build), { cssCodeSplit: false, lib: {
164
164
  name,
165
165
  entry: Object.assign({}, Object.fromEntries(entryList)),
166
166
  formats: ['es', !multiMode ? 'umd' : 'cjs'],
167
167
  fileName: (format, entryName) => `${format}/${entryName}.js`,
168
- }, rollupOptions: {
169
- external: (id) => {
168
+ }, rollupOptions: Object.assign(Object.assign({}, (_b = _config === null || _config === void 0 ? void 0 : _config.build) === null || _b === void 0 ? void 0 : _b.rollupOptions), { external: (id) => {
170
169
  // 将 externalMappings 中的键也添加到 external 中
171
170
  const skip = [...Object.keys(externalMappings)];
172
171
  if (skip.some((s) => id === s || id.startsWith(`${s}/`))) {
173
172
  return true;
174
173
  }
175
174
  return false;
176
- },
177
- output: {
178
- chunkFileNames: () => {
175
+ }, output: Object.assign(Object.assign({}, (_d = (_c = _config === null || _config === void 0 ? void 0 : _config.build) === null || _c === void 0 ? void 0 : _c.rollupOptions) === null || _d === void 0 ? void 0 : _d.output), { chunkFileNames: () => {
179
176
  return '[format]/_chunks/[name]-[hash].js';
180
- },
177
+ },
181
178
  // 使用没有 window. 前缀的映射用于 globals 配置
182
- globals: externalMappingsWithoutWindow,
179
+ globals: externalMappingsWithoutWindow,
183
180
  // 确保正确处理命名导出和默认导出
184
- interop: 'auto',
185
- },
186
- } }, _config === null || _config === void 0 ? void 0 : _config.build),
181
+ interop: 'auto' }) }) }),
187
182
  };
188
183
  });
189
184
  },