mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 03:48:36 -05:00
@@ -1,14 +1,4 @@
|
||||
;(function () {
|
||||
if (typeof window !== 'undefined') {
|
||||
let i
|
||||
if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js$/))) {
|
||||
__webpack_public_path__ = i[1] // eslint-disable-line
|
||||
}
|
||||
} else {
|
||||
__webpack_public_path__ = '/' // eslint-disable-line
|
||||
}
|
||||
})()
|
||||
|
||||
import './setPublicPath'
|
||||
import mod from '~entry'
|
||||
export default mod
|
||||
export * from '~entry'
|
||||
|
||||
@@ -46,6 +46,7 @@ exports.resolveEntry = (prefix, libName, files, async) => {
|
||||
: files.map(file => createElement(prefix, file, file, async)).join('\n')
|
||||
|
||||
const content = `
|
||||
import './setPubicPath'
|
||||
import Vue from 'vue'
|
||||
import wrap from '@vue/web-component-wrapper'
|
||||
|
||||
@@ -54,13 +55,6 @@ import 'css-loader/lib/css-base'
|
||||
import 'vue-style-loader/lib/addStylesShadow'
|
||||
import 'vue-loader/lib/runtime/componentNormalizer'
|
||||
|
||||
;(() => {
|
||||
let i
|
||||
if ((i = document.currentScript) && (i = i.src.match(/(.+\\/)[^/]+\\.js$/))) {
|
||||
__webpack_public_path__ = i[1]
|
||||
}
|
||||
})()
|
||||
|
||||
${elements}`.trim()
|
||||
fs.writeFileSync(filePath, content)
|
||||
return filePath
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
let i
|
||||
if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js$/))) {
|
||||
__webpack_public_path__ = i[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user