feat: basic webpack-chain setup

This commit is contained in:
Igor Randjelovic
2020-11-14 14:27:52 +01:00
parent e704f744b7
commit 9250bf2222
5 changed files with 54 additions and 4 deletions

View File

@ -1,10 +1,23 @@
import base from './base';
import Config from 'webpack-chain';
import { default as Config } from 'webpack-chain';
// todo: add base configuration for vue
export default function (env) {
const config = new Config().merge(base(env));
config.module
.rule('vue')
.test(/\.vue$/)
.use('vue-loader')
.loader('vue-loader')
.tap((options) => {
return {
...options,
compiler: 'nativescript-vue-template-compiler',
};
})
.end();
// todo: we may want to use webpack-chain internally
// to avoid "trying to read property x of undefined" type of issues
/*
@ -14,5 +27,5 @@ export default function (env) {
});
*/
return {};
return config.toConfig();
}