Skip to content

Commit a6f20d6

Browse files
committed
fix(app-ext): Does not work with quasar/app-webpack v4 (release) (#407)
1 parent 8811e4a commit a6f20d6

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

app-extension/.eslintrc.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
parser: '@babel/eslint-parser',
99
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
1010
sourceType: 'module', // Allows for the use of imports
11-
requireConfigFile: false
11+
requireConfigFile: false,
1212
},
1313

1414
env: {
1515
browser: true,
16-
es6: true
16+
es6: true,
1717
},
1818

1919
// Rules order is important, please avoid shuffling them
@@ -26,13 +26,13 @@ module.exports = {
2626
// See https://eslint.vuejs.org/rules/#available-rules
2727
// 'plugin:vue/vue3-essential' // Priority A: Essential (Error Prevention)
2828
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
29-
'plugin:vue/vue3-recommended' // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
29+
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
3030
],
3131

3232
plugins: [
3333
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
3434
// required to lint *.vue files
35-
'vue'
35+
'vue',
3636
],
3737

3838
globals: {
@@ -52,7 +52,7 @@ module.exports = {
5252

5353
// add your custom rules here
5454
rules: {
55-
'brace-style': [ 'error', 'stroustrup', { allowSingleLine: true } ],
55+
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
5656
'prefer-const': 'error',
5757
'prefer-promise-reject-errors': 'off',
5858
'multiline-ternary': 'off',
@@ -64,18 +64,18 @@ module.exports = {
6464
'one-var': 'off',
6565
'no-void': 'off',
6666
'no-lone-blocks': 'error',
67-
'no-unused-expressions': [ 'error', { allowTernary: true, "allowShortCircuit": true } ],
67+
'no-unused-expressions': ['error', { allowTernary: true, allowShortCircuit: true }],
6868
'no-useless-concat': 'error',
6969
'no-useless-return': 'error',
7070
'no-unneeded-ternary': 'error',
71-
'no-confusing-arrow': [ 'error', { allowParens: true } ],
72-
'operator-linebreak': [ 'error', 'before' ],
71+
'no-confusing-arrow': ['error', { allowParens: true }],
72+
'operator-linebreak': ['error', 'before'],
7373
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
7474

75-
'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
76-
'object-curly-spacing': [ 'error', 'always' ],
77-
'computed-property-spacing': [ 'error', 'always' ],
78-
'template-curly-spacing': [ 'error', 'always' ],
75+
// 'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
76+
// 'object-curly-spacing': [ 'error', 'always' ],
77+
// 'computed-property-spacing': [ 'error', 'always' ],
78+
// 'template-curly-spacing': [ 'error', 'always' ],
7979

8080
'import/first': 'off',
8181
// 'import/named': 'error',
@@ -98,6 +98,6 @@ module.exports = {
9898

9999
// allow console.log during production for demo purposes
100100
// 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
101-
'no-console': 'off'
102-
}
101+
'no-console': 'off',
102+
},
103103
}

app-extension/src/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ function extendConf(conf, api) {
1414

1515
if (api.hasVite !== true) {
1616
// make sure app extension files & ui packages get transpiled
17-
conf.build.transpileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
18-
conf.build.transpileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
17+
if (Array.isArray(conf.build.webpackTranspileDependencies)) {
18+
conf.build.webpackTranspileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
19+
conf.build.webpackTranspileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
20+
} else if (Array.isArray(conf.build.transpileDependencies)) {
21+
// fall back (old way)
22+
conf.build.transpileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
23+
conf.build.transpileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
24+
}
1925
}
2026

2127
// make sure these plugins are in the build

0 commit comments

Comments
 (0)