File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11import type { LoaderContext } from 'webpack'
22import * as path from 'path'
3+ import * as crypto from 'crypto'
34import * as qs from 'querystring'
45
5- import hash = require( 'hash-sum' )
6-
76import { compiler } from './compiler'
87import type {
98 TemplateCompiler ,
@@ -66,6 +65,10 @@ let errorEmitted = false
6665const { parse } = compiler
6766const exportHelperPath = require . resolve ( './exportHelper' )
6867
68+ function hash ( text : string ) : string {
69+ return crypto . createHash ( 'sha256' ) . update ( text ) . digest ( 'hex' ) . substring ( 0 , 8 )
70+ }
71+
6972export default function loader (
7073 this : LoaderContext < VueLoaderOptions > ,
7174 source : string
Original file line number Diff line number Diff line change 11/* env jest */
22import * as path from 'path'
3+ import * as crypto from 'crypto'
34import webpack from 'webpack'
45import merge from 'webpack-merge'
5- import hash from 'hash-sum'
66// import MiniCssExtractPlugin from 'mini-css-extract-plugin'
77import { fs as mfs } from 'memfs'
88import { JSDOM , VirtualConsole } from 'jsdom'
99import { VueLoaderPlugin } from '..'
1010import type { VueLoaderOptions } from '..'
1111
12+ function hash ( text : string ) : string {
13+ return crypto . createHash ( 'sha256' ) . update ( text ) . digest ( 'hex' ) . substring ( 0 , 8 )
14+ }
15+
1216export const DEFAULT_VUE_USE = {
1317 loader : 'vue-loader' ,
1418 options : {
You can’t perform that action at this time.
0 commit comments