diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-09-28 12:07:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 12:07:16 +0300 |
commit | 2ac2bc1aeaf8efce6bb9af92506311da99e1757f (patch) | |
tree | 532874be8120221d30307680b2a437cc361d2a70 /vue.config.js | |
parent | 1bc9fdf55352b61c278d298e9935451394230355 (diff) |
[Vue] Introduce Vue + Workflow commands (#17940)
* adding vue
* adding webpack config + example vue library project
* forgot to add base tsconfig.json
* Add build command that allows building all plugins + watching for changes.
* autodetect umd bundles
* initial externals detection
* integrate vue CLI
* add externals config via vue config
* explain regenerator issue
* remove ie11
* Build polyfills in separate library.
* add command to quickly compute total asset size (minified + gzipped)
* output tweak for --exclude-angular
* Explicitly disable support for ie11 since Vue 3 does not support it.
* rebuild and add option to clear webpack cache to build commands
* Add example vue component that compiles w/ vue 3.
* get example vue component to display
* include tslib via polyfills so it is not compiled in each library
* get async component loading to work
* some tweaks and tests
* Add generate vue component command and run to generate activity indicator template.
* switch to using composition api since that is apparently better supported, and get activity indicator adapter to bind data properly
* remove vue-class-component npm package
* eslint changes
* rever tracking JS change
* tweak
* Remove CoreVue vue dir which was just there for testing.
* Update vue.config.js
* apply some review feedback
* add plugin to compute js asset size command
* use local script to build
* update changelog and apply review feedback
* fix bower component mapping
* update expected screenshots
* update screenshot
* Update and rename 4.5.0-b2.php to 4.6.0-b1.php
* Update Version.php
* update expected screenshot
* updates expected UI test files
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'vue.config.js')
-rw-r--r-- | vue.config.js | 30 |
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, + }); + }, +}; |