We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffec821 commit a95f23cCopy full SHA for a95f23c
src/enhanceAppFiles.js
@@ -1,15 +1,12 @@
1
const path = require("path");
2
-
+const vueLivePath = path.join(__dirname, "./vueLiveWithLayout");
3
module.exports = function enhanceAppFiles() {
4
const content = [
5
// import live with es6 so that it is compatible with both build and dev
6
'import Vue from "vue";',
7
// and in order for the loading to happen after we assign the variable,
8
// we load vue-live as a require instead of an import
9
- `import VueLive from ${JSON.stringify(
10
- path.join(__dirname, "./vueLiveWithLayout")
11
- )};`,
12
- "Vue.component('vue-live', VueLive);"
+ `Vue.component("VueLive", () => import(${JSON.stringify(vueLivePath)}))`
13
].join("\n");
14
return { name: "vue-live-enhancer", content };
15
};
0 commit comments