2016-09-26 19:01:53 +08:00
|
|
|
var cooking = require('cooking');
|
|
|
|
var Components = require('../components.json');
|
|
|
|
var config = require('./config');
|
|
|
|
|
|
|
|
cooking.set({
|
2016-09-27 14:55:37 +08:00
|
|
|
entry: Components,
|
2016-09-26 19:01:53 +08:00
|
|
|
dist: './lib',
|
|
|
|
clean: false,
|
|
|
|
format: 'cjs',
|
|
|
|
extends: ['vue2'],
|
|
|
|
minimize: false,
|
|
|
|
externals: config.externals,
|
|
|
|
alias: config.alias
|
|
|
|
});
|
|
|
|
|
2016-10-31 09:21:13 +08:00
|
|
|
cooking.add('output.filename', '[name].js');
|
2016-09-26 19:01:53 +08:00
|
|
|
cooking.add('loader.js.exclude', config.jsexclude);
|
2017-08-23 18:07:14 +08:00
|
|
|
cooking.add('loader.scss', {
|
|
|
|
test: /\.scss$/,
|
|
|
|
loaders: ['style-loader', 'css-loader', 'sass-loader']
|
|
|
|
});
|
2016-10-22 00:45:18 +08:00
|
|
|
cooking.add('vue.preserveWhitespace', false);
|
2016-09-26 19:01:53 +08:00
|
|
|
module.exports = cooking.resolve();
|