File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed
Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ const path = require ( 'path' )
2+
13module . exports = ( api , options ) => {
24 if ( options . pluginOptions . quasar . rtlSupport ) {
35 process . env . QUASAR_RTL = true
@@ -23,5 +25,15 @@ module.exports = (api, options) => {
2325 )
2426
2527 chain . performance . maxEntrypointSize ( 512000 )
28+
29+ const strategy = options . pluginOptions . quasar . importStrategy
30+
31+ if ( [ 'kebab' , 'pascal' , 'combined' ] . includes ( strategy ) ) {
32+ chain . module . rule ( 'vue' )
33+ . use ( 'quasar-auto-import' )
34+ . loader ( path . join ( __dirname , 'lib/loader.auto-import.js' ) )
35+ . options ( strategy )
36+ . before ( 'cache-loader' )
37+ }
2638 } )
2739}
Original file line number Diff line number Diff line change 1- const getDevlandFile = require ( '../helpers/get-devland-file' )
1+ function getDevlandFile ( name ) {
2+ return require (
3+ require . resolve ( name , {
4+ paths : [ __dirname ]
5+ } )
6+ )
7+ }
28
39const data = getDevlandFile ( 'quasar/dist/babel-transforms/auto-import.json' )
410
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ module.exports = [
1414 message : 'Pick a Quasar components & directives import strategy: (can be changed later)' ,
1515 choices : [
1616 {
17- name : '* Auto-import in-use Quasar components & directives\n - slightly higher compile time; next to minimum bundle size; most convenient ' ,
18- value : '\'auto\' ' ,
19- short : 'Auto import' ,
17+ name : '* Auto-import in-use Quasar components & directives (kebab-case, can be later changed to \'pascal\' or \'combined\') ' ,
18+ value : 'kebab ' ,
19+ short : 'Auto import (kebab-case) ' ,
2020 checked : true
2121 } ,
2222 {
23- name : '* Manually specify what to import\n - fastest compile time; minimum bundle size; most tedious ' ,
23+ name : '* Manually specify what to import' ,
2424 value : '\'manual\'' ,
2525 short : 'Manual'
2626 }
You can’t perform that action at this time.
0 commit comments