module.exports = merge({}, require('./base.config'), {
entry: {
script: /^src\/okam\/app\.(js|es|es6|ts)$/
},
polyfill: ['async'],
rules: []
});
console.log('>>>userConfig before merge<<<\n', userConfig);
console.log('>>>buildConf before merge<<<\n', buildConf);
buildConf = merge({}, buildConf, userConfig, {appType});
console.log('>>>buildConf after merge<<<\n', buildConf);
>>>userConfig before merge<<<
{ verbose: false,
root: '/Users/liyinan/code/edu-core-fe',
output: { dir: 'dist', depDir: 'src/common' },
component: { extname: 'vue', template: { transformTags: {} } },
framework: [ 'data', 'watch', 'broadcast', 'ref', 'redux' ],
processors:
{ babel7: { extnames: [Array] },
postcss: { extnames: [Array], options: [Object] } },
server: { port: 9090, type: 'connect', middlewares: [] },
prod: { rules: [ [Object] ] },
dev: { rules: [ [Object], [Object] ] },
test: { rules: [ [Object] ] },
entry: { script: /^src\/okam\/app\.(js|es|es6|ts)$/ },
polyfill: [ 'async' ],
rules: [],
configPath: undefined }
>>>buildConf before merge<<<
{ verbose: false,
root: '/Users/liyinan/code/edu-core-fe',
designWidth: 750,
framework: null,
api: null,
polyfill: null,
localPolyfill: null,
resolve: null,
script: null,
source: { dir: 'src', exclude: [], include: [ /^project\.\w+$/ ] },
entry:
{ script: /^src\/app\.(js|es|es6|ts)$/,
style: /^src\/app\.(css|styl|less|sass|scss)$/,
projectConfig: /^project\.\w+$/ },
output:
{ dir: 'dist',
depDir: 'src/dep',
file: [Function: file],
appBaseClass: { app: 'App', component: 'Component', page: 'Page' },
pathMap:
{ projectConfig: 'project.swan.json',
entryScript: 'app.js',
entryStyle: 'app.css',
appConfig: 'app.json' },
componentPartExtname: { script: 'js', style: 'css', tpl: 'swan', config: 'json' } },
component:
{ global: null,
extname: 'okm',
template: { transformTags: null } },
wx2swan: false,
native: true,
processors:
{ cssImport:
{ processor: 'postcss',
extnames: [Array],
rext: 'css',
options: [Object] } },
rules:
[ { match: [Function: match], processors: [Array] },
{ match: [Function: match], processors: [Array] },
{ match: [Function: match], processors: [Array] } ],
watch: false,
server: null,
dev: {} }
>>>buildConf after merge<<<
{ verbose: false,
root: '/Users/liyinan/code/edu-core-fe',
designWidth: 750,
framework: [ 'data', 'watch', 'broadcast', 'ref', 'redux' ],
api: null,
polyfill: [ 'async' ],
localPolyfill: null,
resolve: null,
script: null,
source: { dir: 'src', exclude: [], include: [ /^project\.\w+$/ ] },
entry:
{ script: {},
style: /^src\/app\.(css|styl|less|sass|scss)$/,
projectConfig: /^project\.\w+$/ },
output:
{ dir: 'dist',
depDir: 'src/common',
file: [Function: file],
appBaseClass: { app: 'App', component: 'Component', page: 'Page' },
pathMap:
{ projectConfig: 'project.swan.json',
entryScript: 'app.js',
entryStyle: 'app.css',
appConfig: 'app.json' },
componentPartExtname: { script: 'js', style: 'css', tpl: 'swan', config: 'json' } },
component: { global: null, extname: 'vue', template: { transformTags: {} } },
wx2swan: false,
native: true,
processors:
{ cssImport:
{ processor: 'postcss',
extnames: [Array],
rext: 'css',
options: [Object] },
babel7: { extnames: [Array] },
postcss: { extnames: [Array], options: [Object] } },
rules:
[ { match: [Function: match], processors: [Array] },
{ match: [Function: match], processors: [Array] },
{ match: [Function: match], processors: [Array] } ],
watch: false,
server: { port: 9090, type: 'connect', middlewares: [] },
dev: { rules: [ [Object], [Object] ] },
prod: { rules: [ [Object] ] },
test: { rules: [ [Object] ] },
configPath: undefined,
appType: 'swan' }
okam [INFO] build start...
okam [INFO] build app type: swan
okam [INFO] load process files from edu-core-fe
okam [INFO] load process files done, file count: 44, load time: 9.98 ms
okam [INFO] build for dev env
okam [INFO] process project.json5 4.45 ms
okam [INFO] src/wise/assets/img/apple-touch-icon.png has already been compressed
okam [INFO] process src/wise/assets/img/apple-touch-icon.png 148 ms
okam [INFO] src/okam/common/img/okm.png has already been compressed
okam [INFO] process src/okam/common/img/okm.png 617 μs
okam [INFO] process files done: 154 ms
okam [INFO] output files to dist done: 19 ms
okam [INFO] build done: 183 ms
okam [INFO] Watch file change start...