Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vue.config.js')
-rw-r--r--vue.config.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/vue.config.js b/vue.config.js
new file mode 100644
index 0000000000..ef7b9a550a
--- /dev/null
+++ b/vue.config.js
@@ -0,0 +1,30 @@
+const fs = require('fs');
+const path = require('path');
+
+const pluginExternals = scanPluginExternals();
+
+function scanPluginExternals() {
+ const pluginExternals = {};
+
+ const pluginsDir = path.join(__dirname, '..', '..');
+ for (let pluginName of fs.readdirSync(pluginsDir)) {
+ const vuePackageFolder = path.join(pluginsDir, pluginName, 'vue', 'src');
+ if (!fs.existsSync(vuePackageFolder)) {
+ continue;
+ }
+
+ pluginExternals[pluginName] = pluginName;
+ }
+
+ return pluginExternals;
+}
+
+module.exports = {
+ publicPath: "",
+ chainWebpack: config => {
+ config.externals({
+ 'tslib': 'tslib',
+ ...pluginExternals,
+ });
+ },
+};