vue-cli-plugin-quasar icon indicating copy to clipboard operation
vue-cli-plugin-quasar copied to clipboard

Impossible to externalise quasar

Open lopes-gustavo opened this issue 4 years ago • 2 comments

I'm using single-spa and importing a Vue app with Quasar plugin. I'm trying to make quasar external (loading it via umd bundle), but the plugin won't allow me.

I tried both:

chainWebpack: config => {
    config.externals({
      ...config.get('externals'),
      'quasar': 'quasar'
    })
  },

and

configureWebpack: config => {
    config.externals = [
      'quasar'
    ]
  },

To Reproduce Steps to reproduce the behavior:

  1. Install quasar plugin inside a vue project
  2. Add quasar to externals in webpack config
  3. Analyse bundle
  4. See quasar is still there

Expected behavior Bundle would not have quasar components, as it's external

Platform (please complete the following information): OS: MacOS Big Sur 11.0.1 Node: 12.16.2 NPM: 6.14.8 Yarn: Not applicable Browsers: Not applicable iOS: Not applicable Android: Not applicable Electron: Not applicable

lopes-gustavo avatar Jan 28 '21 22:01 lopes-gustavo

I'm trying to do the same thing but can't solve :/ I think the plugin miss the options to import all components like framework: { all: true } with quasar cli

alemila01 avatar Feb 19 '21 21:02 alemila01

Even with build as lib this plugin create 300kb of quasar in the output

With the old v1 work as expected

Following some of this https://stackoverflow.com/questions/65810613/how-can-i-eject-quasar-cli-and-use-vue-quasar-umd and removing plugin work perfectly (I do not used the autoimport of that link only the initialization of quasar plugin) Yes I need to import manually (like older version) but the build js is free of the quasar stuff

Hope someday this is fixed, I know use of the quasar cli is the preferred way but I'm working with some mixed old stuff and a build free of the quasar stuff is essential

Even a guide to build an externalized quasar with the official cli is good for me

mila76 avatar Mar 06 '21 21:03 mila76