File tree 8 files changed +464
-13
lines changed
8 files changed +464
-13
lines changed Original file line number Diff line number Diff line change 2
2
exploration
3
3
node_modules
4
4
* .log
5
+ example /dist
Original file line number Diff line number Diff line change
1
+ example
2
+ test
3
+ * .yml
4
+ * .log
5
+ yarn.lock
Original file line number Diff line number Diff line change
1
+ < div id ="app "> </ div >
2
+ < script src ="/dist/bundle.js "> </ script >
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+ import Foo from './source.vue'
3
+
4
+ new Vue ( {
5
+ el : '#app' ,
6
+ render : h => h ( Foo )
7
+ } )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ <h1 :class =" $style.red" >{{ msg }}</h1 >
4
+ </div >
5
+ </template >
6
+
7
+ <script >
8
+ export default {
9
+ data () {
10
+ return {
11
+ msg: ' fesfff'
12
+ }
13
+ }
14
+ }
15
+ </script >
16
+
17
+ <style module>
18
+ .red {
19
+ color : red ;
20
+ }
21
+ </style >
22
+
23
+ <foo >
24
+ export default comp => {
25
+ console.log(comp.options.data())
26
+ }
27
+ </foo >
Original file line number Diff line number Diff line change
1
+ const path = require ( 'path' )
2
+ const VueLoaderPlugin = require ( '../lib/plugin' )
3
+
4
+ module . exports = {
5
+ mode : 'development' ,
6
+ entry : path . resolve ( __dirname , './main.js' ) ,
7
+ output : {
8
+ path : path . resolve ( __dirname , 'dist' ) ,
9
+ filename : 'bundle.js' ,
10
+ publicPath : '/dist/'
11
+ } ,
12
+ devServer : {
13
+ stats : "minimal" ,
14
+ contentBase : __dirname
15
+ } ,
16
+ module : {
17
+ rules : [
18
+ {
19
+ test : / \. v u e $ / ,
20
+ loader : 'vue-loader'
21
+ } ,
22
+ {
23
+ resourceQuery : / b l o c k T y p e = f o o / ,
24
+ loader : 'babel-loader'
25
+ } ,
26
+ {
27
+ test : / \. c s s $ / ,
28
+ oneOf : [
29
+ {
30
+ resourceQuery : / m o d u l e / ,
31
+ use : [
32
+ 'vue-style-loader' ,
33
+ {
34
+ loader : 'css-loader' ,
35
+ options : {
36
+ modules : true ,
37
+ localIdentName : '[local]_[hash:base64:8]'
38
+ }
39
+ }
40
+ ]
41
+ } ,
42
+ {
43
+ use : [
44
+ 'vue-style-loader' ,
45
+ 'css-loader'
46
+ ]
47
+ }
48
+ ]
49
+ } ,
50
+ {
51
+ test : / \. s c s s $ / ,
52
+ use : [
53
+ 'vue-style-loader' ,
54
+ {
55
+ loader : 'css-loader' ,
56
+ options : {
57
+ modules : true ,
58
+ localIdentName : '[local]_[hash:base64:8]'
59
+ }
60
+ } ,
61
+ {
62
+ loader : 'sass-loader' ,
63
+ options : {
64
+ data : '$color: red;'
65
+ }
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ } ,
71
+ resolveLoader : {
72
+ alias : {
73
+ 'vue-loader' : require . resolve ( '../lib' )
74
+ }
75
+ } ,
76
+ plugins : [
77
+ new VueLoaderPlugin ( )
78
+ ]
79
+ }
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"test" : " jest --env node" ,
8
8
"lint" : " eslint lib test --fix" ,
9
- "build" : " webpack --config exploration /webpack.config.js" ,
10
- "dev" : " webpack-dev-server --config exploration /webpack.config.js --inline --hot"
9
+ "build" : " webpack --config example /webpack.config.js --hide-modules " ,
10
+ "dev" : " webpack-dev-server --config example /webpack.config.js --inline --hot"
11
11
},
12
12
"author" : " Evan You" ,
13
13
"license" : " MIT" ,
43
43
"babel-core" : " ^6.26.0" ,
44
44
"babel-loader" : " ^7.1.4" ,
45
45
"babel-preset-env" : " ^1.6.1" ,
46
+ "conventional-changelog" : " ^1.1.19" ,
46
47
"css-loader" : " ^0.28.11" ,
47
48
"eslint" : " ^4.19.0" ,
48
49
"eslint-plugin-vue-libs" : " ^2.1.0" ,
You can’t perform that action at this time.
0 commit comments