File tree Expand file tree Collapse file tree 5 files changed +54
-4
lines changed
Expand file tree Collapse file tree 5 files changed +54
-4
lines changed Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` vue configuration works 1` ] = `
4+ Object {
5+ " entry" : Object {
6+ " bundle.js" : Array [
7+ " bundle.js" ,
8+ ],
9+ },
10+ " module" : Object {
11+ " rules" : Array [
12+ Object {
13+ " test" : / \\\\\\ . vue\\ $ / ,
14+ " use" : Array [
15+ Object {
16+ " loader" : " vue-loader" ,
17+ " options" : Object {
18+ " compiler" : " nativescript-vue-template-compiler" ,
19+ },
20+ },
21+ ],
22+ },
23+ ],
24+ },
25+ }
26+ ` ;
Original file line number Diff line number Diff line change 1+ import { vueConfig } from '@nativescript/webpack' ;
2+
3+ describe ( 'vue configuration' , ( ) => {
4+ it ( 'works' , ( ) => {
5+ expect ( vueConfig ( '' ) ) . toMatchSnapshot ( ) ;
6+ } ) ;
7+ } ) ;
Original file line number Diff line number Diff line change @@ -2,5 +2,9 @@ import { Configuration } from 'webpack';
22
33// todo: add base configuration that's shared across all flavors
44export default function ( env ) : Configuration {
5- return { } ;
5+ return {
6+ entry : {
7+ 'bundle.js' : 'bundle.js' ,
8+ } ,
9+ } ;
610}
Original file line number Diff line number Diff line change 11import base from './base' ;
2- import Config from 'webpack-chain' ;
2+ import { default as Config } from 'webpack-chain' ;
33
44// todo: add base configuration for vue
55export default function ( env ) {
66 const config = new Config ( ) . merge ( base ( env ) ) ;
77
8+ config . module
9+ . rule ( 'vue' )
10+ . test ( / \. v u e $ / )
11+ . use ( 'vue-loader' )
12+ . loader ( 'vue-loader' )
13+ . tap ( ( options ) => {
14+ return {
15+ ...options ,
16+ compiler : 'nativescript-vue-template-compiler' ,
17+ } ;
18+ } )
19+ . end ( ) ;
20+
821 // todo: we may want to use webpack-chain internally
922 // to avoid "trying to read property x of undefined" type of issues
1023 /*
@@ -14,5 +27,5 @@ export default function (env) {
1427 });
1528 */
1629
17- return { } ;
30+ return config . toConfig ( ) ;
1831}
Original file line number Diff line number Diff line change 1919 " src"
2020 ]
2121 },
22- "allowSyntheticDefaultImports " : true
22+ "esModuleInterop " : true
2323 },
2424 "exclude" : [
2525 " node_modules"
You can’t perform that action at this time.
0 commit comments