File tree 6 files changed +15
-6
lines changed
6 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
import * as fs from 'fs'
2
2
import type { SFCDescriptor } from 'vue/compiler-sfc'
3
- import { parse } from 'vue /compiler-sfc '
3
+ import { compiler } from '. /compiler'
4
4
5
+ const { parse } = compiler
5
6
const cache = new Map < string , SFCDescriptor > ( )
6
7
7
8
export function setDescriptor ( filename : string , entry : SFCDescriptor ) {
Original file line number Diff line number Diff line change 1
1
import type { CompilerError } from 'vue/compiler-sfc'
2
- import { generateCodeFrame } from 'vue /compiler-sfc '
2
+ import { compiler } from '. /compiler'
3
3
import chalk = require( 'chalk' )
4
4
5
+ const { generateCodeFrame } = compiler
6
+
5
7
export function formatError (
6
8
err : SyntaxError | CompilerError ,
7
9
source : string ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as loaderUtils from 'loader-utils'
5
5
6
6
import hash = require( 'hash-sum' )
7
7
8
- import { parse } from 'vue /compiler-sfc '
8
+ import { compiler } from '. /compiler'
9
9
import type {
10
10
TemplateCompiler ,
11
11
CompilerOptions ,
@@ -43,6 +43,7 @@ export interface VueLoaderOptions {
43
43
44
44
let errorEmitted = false
45
45
46
+ const { parse } = compiler
46
47
const exportHelperPath = JSON . stringify ( require . resolve ( './exportHelper' ) )
47
48
48
49
export default function loader (
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ import type {
6
6
} from 'vue/compiler-sfc'
7
7
import type { VueLoaderOptions } from 'src'
8
8
import { resolveTemplateTSOptions } from './util'
9
- import { compileScript } from 'vue /compiler-sfc '
9
+ import { compiler } from '. /compiler'
10
10
11
+ const { compileScript } = compiler
11
12
const clientCache = new WeakMap < SFCDescriptor , SFCScriptBlock | null > ( )
12
13
const serverCache = new WeakMap < SFCDescriptor , SFCScriptBlock | null > ( )
13
14
Original file line number Diff line number Diff line change 1
1
import * as qs from 'querystring'
2
2
import webpack = require( 'webpack' )
3
- import { compileStyle } from 'vue/compiler-sfc'
3
+ import { compiler } from './compiler'
4
+
5
+ const { compileStyle } = compiler
4
6
5
7
// This is a post loader that handles scoped CSS transforms.
6
8
// 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'
7
7
import { getDescriptor } from './descriptorCache'
8
8
import { resolveScript } from './resolveScript'
9
9
import { resolveTemplateTSOptions } from './util'
10
- import { compileTemplate } from 'vue/compiler-sfc'
10
+ import { compiler } from './compiler'
11
+
12
+ const { compileTemplate } = compiler
11
13
12
14
// Loader that compiles raw template into JavaScript functions.
13
15
// This is injected by the global pitcher (../pitch) for template
You can’t perform that action at this time.
0 commit comments