create-webpack-papa
Advanced tools
Comparing version 3.2.2 to 3.3.0
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "3.2.2", | ||
"version": "3.3.0", | ||
"description": "", | ||
@@ -9,0 +9,0 @@ "scripts": { |
@@ -14,16 +14,38 @@ module.exports = { | ||
//代理 | ||
proxy:[ | ||
proxy: [ | ||
{ | ||
filterPathname: /^\/(?!activity\/)/, // 代理pathname非以activity开头的所有请求 | ||
target: 'http://localhost:80', | ||
}, | ||
filterPathname: /^\/(?!activity\/)/, // 代理pathname非以activity开头的所有请求 | ||
target: 'http://localhost:80' | ||
} | ||
], | ||
//开发环境端口 | ||
servePort: 3005, | ||
serveContentBase:'./build/', | ||
//选定需要合并的非模块的文件,必须在 resource/js 里 | ||
serveContentBase: './build/', | ||
//选定需要合并的非模块的文件,必须在 resource/js 里 | ||
staticFileConcatOrder: [], | ||
staticFileSubPath:'static', | ||
staticFileName:'common.js', | ||
staticFileSubPath: 'static', | ||
staticFileName: 'common.js', | ||
// 是否启用自带的plugin | ||
defPlugin: { | ||
sri: true, //webpack-subresource-integrity, 非https的话,请设为false | ||
uglifyJs: true //是否压缩js | ||
}, | ||
// 加入其他 webpack 插件 | ||
customPlugin: { | ||
production: [], // 正式环境 | ||
development: [] // 开发环境 | ||
}, | ||
/** | ||
* 即将执行编译前的时候,根据这个函数返回决定是继续还是中断。可为空,空则忽略。 分正式环境和开发环境 | ||
* aTargets {array} 用户输入所有项目的完整路径 | ||
* return {boolean} false 则中断编译 | ||
*/ | ||
shouldCompileProceed: { | ||
production: (aTargets)=>{return true}, | ||
development: (aTargets)=>{return true}, | ||
}, | ||
webpackConfig: {}, | ||
@@ -34,7 +56,15 @@ //是否支持ie8 | ||
// 定义一个页面下面还分哪些版本页面。比如一个单页项目,不适合做响应式,需要包含电脑端和移动端两个页面。可以定义为空,则忽略掉这个情况 | ||
commSingleProjSubPage:['m', 'pc'], | ||
commSingleProjSubPage: ['m', 'pc'], | ||
// 辨别一个项目时,只要一个文件夹里面包含以下文件或文件夹,则认定它为一个项目。(无论单独页面还是多页面) | ||
projContainsOneOf: ['m', 'pc', 'proj.json', 'config.json'], | ||
// 获取所有项目时,排除以下这些文件夹里面的内容(不会在已识别为proj的文件夹里再查找) | ||
projScanExclude:['modules', 'module', 'static', 'components', 'component', 'img', 'js'], | ||
projScanExclude: [ | ||
'modules', | ||
'module', | ||
'static', | ||
'components', | ||
'component', | ||
'img', | ||
'js' | ||
], | ||
// 验证 webpack 入口必须包含这个值的所有文件。 | ||
@@ -73,3 +103,3 @@ entryInclude: ['index.js', 'index.html'], | ||
}, | ||
frontendConfCode:`try{ | ||
frontendConfCode: `try{ | ||
Object.assign(window.publicConfig, { | ||
@@ -79,3 +109,3 @@ mode:"{$mode}", | ||
}); | ||
}catch(e){}`, | ||
}catch(e){}` | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125747
658