2017-02-03 10:55:11 -05:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const build = require('@microsoft/sp-build-web');
|
|
|
|
var merge = require('webpack-merge');
|
|
|
|
|
|
|
|
build.sass.setConfig({
|
|
|
|
sassMatch: []
|
|
|
|
});
|
|
|
|
|
|
|
|
build.configureWebpack.setConfig({
|
|
|
|
additionalConfiguration: function (config) {
|
|
|
|
var vueConfig = {
|
2018-01-20 09:00:45 -05:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'vue$': 'vue/dist/vue.esm.js'
|
|
|
|
}
|
|
|
|
},
|
2017-02-03 10:55:11 -05:00
|
|
|
module: {
|
2017-06-15 08:34:20 -04:00
|
|
|
rules: [
|
2017-02-03 10:55:11 -05:00
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
2017-06-15 08:34:20 -04:00
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'vue-loader',
|
|
|
|
options: {
|
|
|
|
esModule: true
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}]
|
2017-02-03 10:55:11 -05:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
return merge(config, vueConfig);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-10-09 04:44:26 -04:00
|
|
|
let copyOtherFiles = build.subTask('copy-other-files', function(gulp, buildOptions, done){
|
|
|
|
return gulp.src(['src/**/*.vue', 'src/**/*.scss'])
|
|
|
|
.pipe(gulp.dest(buildOptions.libFolder))
|
2017-02-03 10:55:11 -05:00
|
|
|
});
|
2017-10-09 04:44:26 -04:00
|
|
|
build.task('copy-other-files', copyOtherFiles);
|
|
|
|
build.rig.addPostTypescriptTask(copyOtherFiles);
|
2017-02-03 10:55:11 -05:00
|
|
|
|
|
|
|
build.initialize(gulp);
|