Selaa lähdekoodia

chore: compile vueleton with babel

Gerald 3 vuotta sitten
vanhempi
sitoutus
d1a821c283
4 muutettua tiedostoa jossa 10 lisäystä ja 5 poistoa
  1. 0 0
      babel.config.js
  2. 1 1
      package.json
  3. 5 0
      scripts/webpack.conf.js
  4. 4 4
      yarn.lock

+ 0 - 0
.babelrc.js → babel.config.js


+ 1 - 1
package.json

@@ -70,7 +70,7 @@
     "codemirror-js-mixed": "^0.9.2",
     "tldjs": "^2.3.1",
     "vue": "^3.2.37",
-    "vueleton": "^2.0.0-4"
+    "vueleton": "^2.0.0-5"
   },
   "engines": {
     "node": ">=12"

+ 5 - 0
scripts/webpack.conf.js

@@ -105,6 +105,11 @@ const modify = (page, entry, init) => modifyWebpackConfig(
       new TerserPlugin(MIN_OPTS_PUBLIC),
       new TerserPlugin(MIN_OPTS_MAIN),
     ]);
+    config.module.rules.find(rule => {
+      if (typeof rule.test?.test === 'function' && rule.test.test('file.js')) {
+        rule.exclude = file => /node_modules/.test(file) && !/vueleton/.test(file);
+      }
+    });
     if (!entry) init = page;
     if (init) init(config);
     return config;

+ 4 - 4
yarn.lock

@@ -10429,10 +10429,10 @@ vue@^3.2.37:
     "@vue/server-renderer" "3.2.39"
     "@vue/shared" "3.2.39"
 
-vueleton@^2.0.0-4:
-  version "2.0.0-4"
-  resolved "https://registry.yarnpkg.com/vueleton/-/vueleton-2.0.0-4.tgz#5391c27dc85434899b6a074b70cfa08ac9e717be"
-  integrity sha512-tAHXbNDcXRbY41sC9KEiuNDMJmFEnwZMKrgAheSHZEMI8HbpEdUW5DCdFex7GtpEZtFcTK5ifJHWFR0m3whrDA==
+vueleton@^2.0.0-5:
+  version "2.0.0-5"
+  resolved "https://registry.yarnpkg.com/vueleton/-/vueleton-2.0.0-5.tgz#3f22e5dc4341234db6b2d60bfed4aa499a961d2d"
+  integrity sha512-HA09S7iq+OIwRNrnoB0F4Y9lqWhCEjhjKzoeWl7KmzLs6tZxLiNWf4QchQBRWutuw0aEEQCzp6vvzoDPyoLLAQ==
   dependencies:
     "@babel/runtime" "^7.19.0"
     globby "^13.1.2"