This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
22 "name" : " static-render-html-webpack-plugin" ,
3- "version" : " 1.1.1 " ,
3+ "version" : " 1.1.2 " ,
44 "description" : " Simplifies creation of HTML static files using webpack" ,
55 "main" : " dist/index.js" ,
66 "scripts" : {
77 "build" : " babel ./src --out-dir ./dist" ,
88 "test" : " mocha test/index.js --compilers js:babel-register" ,
9+ "postinstall" : " npm run build" ,
910 "prebuild" : " rimraf dist" ,
1011 "test:watch" : " npm t -- --watch"
1112 },
Original file line number Diff line number Diff line change @@ -13,13 +13,12 @@ class StaticRenderHtmlWebpackPlugin {
1313 constructor ( options ) {
1414 this . options = Object . assign ( { } , {
1515 entry : '' ,
16- pretty : true ,
16+ pretty : false ,
1717 } , options ) ;
1818 }
1919
2020 apply ( compiler ) {
2121 const entry = this . options . entry ;
22- const FILE_SUPPORT_REGEXP = / .( j s | j s x ) $ / g;
2322
2423 compiler . plugin ( 'emit' , ( compilation , callback ) => {
2524 let result = '' ;
@@ -32,6 +31,7 @@ class StaticRenderHtmlWebpackPlugin {
3231 let fileExtension = entry . split ( '.' ) ;
3332 fileExtension = `.${ fileExtension [ fileExtension . length - 1 ] } ` ;
3433
34+ const FILE_SUPPORT_REGEXP = / .( j s | j s x ) $ / g;
3535 if ( ! FILE_SUPPORT_REGEXP . test ( fileExtension ) ) {
3636 compilation . errors . push ( prettyError . fileExtension ( entry , compiler . context ) ) ;
3737 return callback ( ) ;
You can’t perform that action at this time.
0 commit comments