Skip to content

Commit ec3c968

Browse files
committed
fix: add missing import statement removed while cherry picking
1 parent 55f5cdc commit ec3c968

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import * as qs from 'querystring'
44

55
import hash = require('hash-sum')
66

7+
import { Template } from 'webpack'
8+
79
import { compiler } from './compiler'
810
import type {
911
TemplateCompiler,
@@ -309,13 +311,13 @@ export default function loader(
309311

310312
/* Style injection in beforeCreate */
311313
if (/injectStyles/.test(stylesCode)) {
312-
code += webpack.Template.asString([
314+
code += Template.asString([
313315
'\n',
314316
`const _useSSRContext_ = require('vue').useSSRContext`,
315317
'const _oldBeforeCreate_ = script.beforeCreate',
316318
'',
317319
'function _beforeCreate_() {',
318-
webpack.Template.indent([
320+
Template.indent([
319321
'const ssrContext = _useSSRContext_()',
320322
'injectStyles(ssrContext)',
321323
`if (typeof _oldBeforeCreate_ === 'function') { _oldBeforeCreate_() }`,

0 commit comments

Comments
 (0)