22import path from 'path'
33import webpack from 'webpack'
44import merge from 'webpack-merge'
5- import MiniCssExtractPlugin from 'mini-css-extract-plugin'
5+ // import MiniCssExtractPlugin from 'mini-css-extract-plugin'
66import { fs as mfs } from 'memfs'
77
88import { JSDOM , VirtualConsole } from 'jsdom'
@@ -37,10 +37,11 @@ const baseConfig: webpack.Configuration = {
3737 {
3838 test : / \. c s s $ / ,
3939 use : [
40- {
41- loader : MiniCssExtractPlugin . loader ,
42- options : { hmr : true } ,
43- } ,
40+ // {
41+ // loader: MiniCssExtractPlugin.loader,
42+ // options: { hmr: true },
43+ // },
44+ 'style-loader' ,
4445 'css-loader' ,
4546 ] ,
4647 } ,
@@ -52,9 +53,9 @@ const baseConfig: webpack.Configuration = {
5253 __VUE_OPTIONS_API__ : true ,
5354 __VUE_PROD_DEVTOOLS__ : false ,
5455 } ) ,
55- new MiniCssExtractPlugin ( {
56- filename : '[name].css' ,
57- } ) ,
56+ // new MiniCssExtractPlugin({
57+ // filename: '[name].css',
58+ // }),
5859 ] ,
5960}
6061
@@ -142,7 +143,7 @@ export async function mockBundleAndRun(
142143
143144 let jsdomError
144145 const dom = new JSDOM (
145- `<!DOCTYPE html><html><head></head><body></body></html>` ,
146+ `<!DOCTYPE html><html><head></head><body><div id="#app"></div>< /body></html>` ,
146147 {
147148 runScripts : 'outside-only' ,
148149 virtualConsole : new VirtualConsole ( ) ,
@@ -171,3 +172,7 @@ export async function mockBundleAndRun(
171172 jsdomError,
172173 }
173174}
175+
176+ export function normalizeNewline ( input : string ) : string {
177+ return input . replace ( new RegExp ( '\r\n' , 'g' ) , '\n' )
178+ }
0 commit comments