mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
feat: basic webpack-chain setup
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user