File tree 2 files changed +34
-4
lines changed 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 15
15
"aspnet-prerendering" : " 3.0.1" ,
16
16
"vue" : " ^2.5.13" ,
17
17
"vue-server-renderer" : " ^2.5.13" ,
18
- "vue-loader" : " ^14 .2.1 " ,
18
+ "vue-loader" : " ^15 .2.4 " ,
19
19
"vue-template-compiler" : " ^2.5.13" ,
20
20
"vue-router" : " ^3.0.1" ,
21
21
"vuex" : " ^3.0.1" ,
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
3
+ const VueLoaderPlugin = require ( 'vue-loader/lib/plugin' )
3
4
// using webpack-merge so we don't have to repeat common configuration attributes twice
4
5
const merge = require ( 'webpack-merge' )
5
6
@@ -22,14 +23,43 @@ module.exports = (env) => {
22
23
test : / \. j s $ / ,
23
24
loader : 'babel-loader' ,
24
25
include : __dirname ,
25
- exclude : / n o d e _ m o d u l e s /
26
+ exclude : file => (
27
+ / n o d e _ m o d u l e s / . test ( file ) &&
28
+ ! / \. v u e \. j s / . test ( file )
29
+ )
26
30
} ,
27
31
{
28
32
test : / \. c s s $ / ,
29
- loader : 'style-loader!css-loader'
33
+ oneOf : [
34
+ // this matches `<style module>`
35
+ {
36
+ resourceQuery : / m o d u l e / ,
37
+ use : [
38
+ 'vue-style-loader' ,
39
+ {
40
+ loader : 'css-loader' ,
41
+ options : {
42
+ modules : true ,
43
+ localIdentName : '[local]_[hash:base64:5]'
44
+ }
45
+ }
46
+ ]
47
+ } ,
48
+ // this matches plain `<style>` or `<style scoped>`
49
+ {
50
+ use : [
51
+ 'vue-style-loader' ,
52
+ 'css-loader'
53
+ ]
54
+ }
55
+ ]
56
+
30
57
}
31
58
]
32
- }
59
+ } ,
60
+ plugins : [
61
+ new VueLoaderPlugin ( )
62
+ ]
33
63
} )
34
64
35
65
const clientBundleConfig = merge ( sharedConfig ( ) , {
You can’t perform that action at this time.
0 commit comments