@mirta/rollup 0.4.9 → 0.4.11

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 +5 -4
  2. package/package.json +7 -7
package/dist/runtime.mjs CHANGED
@@ -129,8 +129,8 @@ function toVirtualModulePath(chunkName, pkgDefinition) {
129
129
 
130
130
  const packagesPattern = /(.*)node_modules[\\/]@?(.+)[\\/](.+)?/;
131
131
  const entryMatchers = {
132
- 'wb-rules': /(?:src[\\/])?wb-rules[\\/](.*)/,
133
- 'wb-rules-modules': /(?:src[\\/])?wb-rules-modules[\\/](.*)/,
132
+ 'wb-rules': /^(?:src[\\/])?((?:wb-rules[\\/])(.+)|([^/]+$))/,
133
+ 'wb-rules-modules': /^(?:src[\\/])?wb-rules-modules[\\/](.+)/,
134
134
  };
135
135
  /**
136
136
  * Парсит путь к исходному файлу и возвращает имя модуля формата `wb-rules-modules/...`.
@@ -171,7 +171,8 @@ function tryGetEntryPath(sourcePath, type) {
171
171
  const match = entryMatchers[type].exec(sourcePath);
172
172
  if (!match)
173
173
  return;
174
- return `${type}/${match[1]}.js`;
174
+ const value = match[1];
175
+ return value.startsWith(type) ? `${value}.js` : `${type}/${value}.js`;
175
176
  }
176
177
  /**
177
178
  * Проверяет различные сценарии и возвращает корректный путь выходного файла.
@@ -258,7 +259,7 @@ async function defineRuntimeConfig(options = {}) {
258
259
  // Транспиляция Babel
259
260
  babel({
260
261
  babelHelpers: 'bundled',
261
- extensions: ['.js', '.mjs'],
262
+ extensions: ['.ts', '.js', '.mjs'],
262
263
  presets: [
263
264
  ['@babel/preset-env', {
264
265
  exclude: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirta/rollup",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "sideEffects": false,
5
5
  "description": "Predefined Rollup configuration for wb-rules project builds",
6
6
  "keywords": [
@@ -52,7 +52,7 @@
52
52
  "@babel/core": "^7.28.6",
53
53
  "@babel/preset-env": "^7.28.6",
54
54
  "@babel/plugin-transform-spread": "^7.28.6",
55
- "@dotenvx/dotenvx": "^1.51.4",
55
+ "@dotenvx/dotenvx": "^1.52.0",
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,13 +65,13 @@
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/basics": "0.4.9",
69
- "@mirta/env-loader": "0.4.9",
70
- "@mirta/workspace": "0.4.9",
71
- "@mirta/package": "0.4.9"
68
+ "@mirta/basics": "0.4.11",
69
+ "@mirta/package": "0.4.11",
70
+ "@mirta/env-loader": "0.4.11",
71
+ "@mirta/workspace": "0.4.11"
72
72
  },
73
73
  "devDependencies": {
74
- "rollup": "^4.55.1",
74
+ "rollup": "^4.57.1",
75
75
  "typescript": "^5.8.3"
76
76
  },
77
77
  "peerDependencies": {