File tree Expand file tree Collapse file tree 6 files changed +15
-6
lines changed Expand file tree Collapse file tree 6 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11import * as fs from 'fs'
22import type { SFCDescriptor } from 'vue/compiler-sfc'
3- import { parse } from 'vue /compiler-sfc '
3+ import { compiler } from '. /compiler'
44
5+ const { parse } = compiler
56const cache = new Map < string , SFCDescriptor > ( )
67
78export function setDescriptor ( filename : string , entry : SFCDescriptor ) {
Original file line number Diff line number Diff line change 11import type { CompilerError } from 'vue/compiler-sfc'
2- import { generateCodeFrame } from 'vue /compiler-sfc '
2+ import { compiler } from '. /compiler'
33import chalk = require( 'chalk' )
44
5+ const { generateCodeFrame } = compiler
6+
57export function formatError (
68 err : SyntaxError | CompilerError ,
79 source : string ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as loaderUtils from 'loader-utils'
55
66import hash = require( 'hash-sum' )
77
8- import { parse } from 'vue /compiler-sfc '
8+ import { compiler } from '. /compiler'
99import type {
1010 TemplateCompiler ,
1111 CompilerOptions ,
@@ -43,6 +43,7 @@ export interface VueLoaderOptions {
4343
4444let errorEmitted = false
4545
46+ const { parse } = compiler
4647const exportHelperPath = JSON . stringify ( require . resolve ( './exportHelper' ) )
4748
4849export default function loader (
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ import type {
66} from 'vue/compiler-sfc'
77import type { VueLoaderOptions } from 'src'
88import { resolveTemplateTSOptions } from './util'
9- import { compileScript } from 'vue /compiler-sfc '
9+ import { compiler } from '. /compiler'
1010
11+ const { compileScript } = compiler
1112const clientCache = new WeakMap < SFCDescriptor , SFCScriptBlock | null > ( )
1213const serverCache = new WeakMap < SFCDescriptor , SFCScriptBlock | null > ( )
1314
Original file line number Diff line number Diff line change 11import * as qs from 'querystring'
22import webpack = require( 'webpack' )
3- import { compileStyle } from 'vue/compiler-sfc'
3+ import { compiler } from './compiler'
4+
5+ const { compileStyle } = compiler
46
57// This is a post loader that handles scoped CSS transforms.
68// Injected right before css-loader by the global pitcher (../pitch.js)
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ import type { TemplateCompiler } from 'vue/compiler-sfc'
77import { getDescriptor } from './descriptorCache'
88import { resolveScript } from './resolveScript'
99import { resolveTemplateTSOptions } from './util'
10- import { compileTemplate } from 'vue/compiler-sfc'
10+ import { compiler } from './compiler'
11+
12+ const { compileTemplate } = compiler
1113
1214// Loader that compiles raw template into JavaScript functions.
1315// This is injected by the global pitcher (../pitch) for template
You can’t perform that action at this time.
0 commit comments