5htp 0.4.6-2 → 0.4.6-3

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.4.6-2",
4
+ "version": "0.4.6-3",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp.git",
7
7
  "license": "MIT",
@@ -43,6 +43,24 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
43
43
 
44
44
  return [{
45
45
  loader: require.resolve('babel-loader'),
46
+ exclude: (filePath) => {
47
+ // 1) If not in "node_modules" at all => transpile it
48
+ if (!filePath.includes('node_modules')) {
49
+ return false;
50
+ }
51
+
52
+ // 2) If it’s "node_modules/5htp-core" but NOT "node_modules/5htp-core/node_modules",
53
+ // then transpile. Otherwise, exclude.
54
+ if (
55
+ filePath.includes('node_modules/5htp-core') &&
56
+ !filePath.includes('node_modules/5htp-core/node_modules')
57
+ ) {
58
+ return false;
59
+ }
60
+
61
+ // 3) Everything else in node_modules is excluded
62
+ return true;
63
+ },
46
64
  options: {
47
65
 
48
66
  // https://github.com/babel/babel-loader#options