-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathykit.js
40 lines (38 loc) · 961 Bytes
/
ykit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var path = require('path')
module.exports = {
plugins: [{
name: 'es6'
},
{
name: 'less',
options: {
extract: 'never'
}
}, 'release'],
context: path.join(__dirname, 'src'),
config: {
exports: [
'./core-video-to-gif.js'
],
modifyWebpackConfig: function (baseConfig) {
// edit ykit's Webpack configs
baseConfig.context = path.join(__dirname, 'src')
// baseConfig.module.loaders.push({
// test: /\.tpl$/,
// loader: 'art-template'
// })
// specify the out path
baseConfig.output.prd.path = 'dist'
baseConfig.output.local.path = 'dist'
// baseConfig.postLoaders = { test: /\.js$/, loader: 'es3ify' }
return baseConfig
}
},
hooks: {
beforeCompiling: function (cliParams, webpackConfig) {
// 在这里可以拿到编译配置 webpackConfig,并进行更改
console.log('Do something next!')
}
},
commands: []
}