@mirta/rollup 0.4.7 → 0.4.9

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.
Files changed (2) hide show
  1. package/dist/runtime.mjs +25 -11
  2. package/package.json +9 -9
package/dist/runtime.mjs CHANGED
@@ -3,7 +3,7 @@ import multi from '@rollup/plugin-multi-entry';
3
3
  import nodeResolve from '@rollup/plugin-node-resolve';
4
4
  import ts from '@rollup/plugin-typescript';
5
5
  import replace from '@rollup/plugin-replace';
6
- import { getBabelOutputPlugin } from '@rollup/plugin-babel';
6
+ import { babel } from '@rollup/plugin-babel';
7
7
  import { loadEnvReplacements } from '@mirta/env-loader';
8
8
  import { resolveMonorepoContextAsync } from '@mirta/workspace';
9
9
  import { B as BuildError, d as del } from './errors.mjs';
@@ -183,6 +183,8 @@ function tryGetEntryPath(sourcePath, type) {
183
183
  *
184
184
  **/
185
185
  function getEntryPath(filePath) {
186
+ if (filePath.endsWith('_rollupPluginBabelHelpers'))
187
+ return 'wb-rules-modules/babel/helpers.js';
186
188
  if (filePath.startsWith('_virtual'))
187
189
  return filePath;
188
190
  return tryGetPackageEntryPath(filePath)
@@ -247,8 +249,28 @@ async function defineRuntimeConfig(options = {}) {
247
249
  }),
248
250
  // Поиск зависимостей в node_modules
249
251
  nodeResolve(),
250
- // Транспиляция TypeScript
251
- ts({ tsconfig, outDir }),
252
+ // Компиляция TypeScript
253
+ ts({
254
+ tsconfig,
255
+ outDir,
256
+ alwaysStrict: false,
257
+ }),
258
+ // Транспиляция Babel
259
+ babel({
260
+ babelHelpers: 'bundled',
261
+ extensions: ['.js', '.mjs'],
262
+ presets: [
263
+ ['@babel/preset-env', {
264
+ exclude: [
265
+ '@babel/transform-typeof-symbol',
266
+ ],
267
+ }],
268
+ ],
269
+ plugins: [
270
+ '@babel/transform-spread',
271
+ 'array-includes',
272
+ ],
273
+ }),
252
274
  // Обработка импортов для wb-rules
253
275
  wbRulesImports(),
254
276
  // Подстановка переменных окружения
@@ -268,14 +290,6 @@ async function defineRuntimeConfig(options = {}) {
268
290
  __TEST__: 'false',
269
291
  },
270
292
  }),
271
- // Транспиляция через Babel
272
- getBabelOutputPlugin({
273
- presets: ['@babel/preset-env'],
274
- plugins: [
275
- '@babel/plugin-transform-spread',
276
- 'array-includes',
277
- ],
278
- }),
279
293
  // Очистка виртуальных файлов после сборки
280
294
  del({
281
295
  targets: `${outDir}/_virtual`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirta/rollup",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "sideEffects": false,
5
5
  "description": "Predefined Rollup configuration for wb-rules project builds",
6
6
  "keywords": [
@@ -49,10 +49,10 @@
49
49
  "#configs/*": "./src/configs/*.js"
50
50
  },
51
51
  "dependencies": {
52
- "@babel/core": "^7.28.5",
53
- "@babel/preset-env": "^7.28.5",
54
- "@babel/plugin-transform-spread": "^7.27.1",
55
- "@dotenvx/dotenvx": "^1.51.1",
52
+ "@babel/core": "^7.28.6",
53
+ "@babel/preset-env": "^7.28.6",
54
+ "@babel/plugin-transform-spread": "^7.28.6",
55
+ "@dotenvx/dotenvx": "^1.51.4",
56
56
  "@rollup/plugin-babel": "^6.1.0",
57
57
  "@rollup/plugin-commonjs": "^29.0.0",
58
58
  "@rollup/plugin-multi-entry": "^7.1.0",
@@ -65,10 +65,10 @@
65
65
  "rollup-plugin-copy": "^3.5.0",
66
66
  "rollup-plugin-dts": "^6.3.0",
67
67
  "find-up": "^8.0.0",
68
- "@mirta/env-loader": "0.4.7",
69
- "@mirta/package": "0.4.7",
70
- "@mirta/basics": "0.4.7",
71
- "@mirta/workspace": "0.4.7"
68
+ "@mirta/basics": "0.4.9",
69
+ "@mirta/env-loader": "0.4.9",
70
+ "@mirta/workspace": "0.4.9",
71
+ "@mirta/package": "0.4.9"
72
72
  },
73
73
  "devDependencies": {
74
74
  "rollup": "^4.55.1",