Skip to content

Commit

Permalink
fix(app-webpack): wrong loader-utils reference; remove loader-utils a…
Browse files Browse the repository at this point in the history
…s dep altogether #15280
  • Loading branch information
rstoenescu committed Jan 16, 2023
1 parent c84e83d commit eee9cef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions app-webpack/lib/webpack/loader.vue.auto-import-quasar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const hash = require('hash-sum')

const stringifyRequest = require('loader-utils/lib/stringifyRequest')
const getPackage = require('../helpers/get-package')

const autoImportData = getPackage('quasar/dist/transforms/auto-import.json')
Expand Down Expand Up @@ -60,19 +59,23 @@ function extract (content, ctx, autoImportCase) {
installStatements += `qInstall(script, 'directives', {${dir.join(',')}});`
}

const from = JSON.stringify(ctx.utils.contextify(ctx.context, autoImportRuntimePath))

// stringifyRequest needed so it doesn't
// messes up consistency of hashes between builds
return `
${importStatements}
import qInstall from ${stringifyRequest(ctx, autoImportRuntimePath)};
import qInstall from ${from};
${installStatements}
`
}

function getModuleIdentifierCode (ctx) {
const id = hash(ctx.request)
const from = JSON.stringify(ctx.utils.contextify(ctx.context, injectModuleIdRuntimePath))

return `
import qInject from ${stringifyRequest(ctx, injectModuleIdRuntimePath)};
import qInject from ${from};
qInject(script, '${id}');
`
}
Expand Down
3 changes: 1 addition & 2 deletions app-webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quasar/app-webpack",
"version": "3.7.0",
"version": "3.7.1",
"description": "Quasar Framework App CLI with Webpack",
"bin": {
"quasar": "./bin/quasar"
Expand Down Expand Up @@ -80,7 +80,6 @@
"inquirer": "8.2.2",
"isbinaryfile": "5.0.0",
"launch-editor-middleware": "2.6.0",
"loader-utils": "^3.2.1",
"lodash": "^4.17.21",
"log-update": "4.0.0",
"mini-css-extract-plugin": "2.7.2",
Expand Down

0 comments on commit eee9cef

Please sign in to comment.