Skip to content

Commit e3d592f

Browse files
Use play example to show loader aliasing
1 parent 76dc41d commit e3d592f

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

examples/02-play/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"build:play": "vbuild --config play.config.js"
1010
},
1111
"devDependencies": {
12-
"babel-loader": "^7.0.0",
13-
"babel-preset-es2015": "^6.24.1",
1412
"vbuild": "^7.1.0",
1513
"vue-loader": "^12.1.0",
1614
"vue-play": "^3.2.1",

examples/02-play/play.config.js

+3-12
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,10 @@ module.exports = {
3333
// the root folder of this package.
3434
// You shouldn't do this in your project.
3535
"vue-extract-loader": require.resolve("../../"),
36-
};
3736

38-
config.module.rules.push({
39-
test: /.vue$/,
40-
issuer: path.join(__dirname, "play/index.js"),
41-
use: [ {
42-
loader: "babel-loader",
43-
options: { presets: [ "es2015" ] }
44-
}, {
45-
loader: "vue-extract-loader",
46-
options: { block: "play" },
47-
} ],
48-
});
37+
// You can alias the loader to avoid repeating the configuration query
38+
"vue-play-loader": "vue-extract-loader?block=play",
39+
};
4940

5041
return config;
5142
},

examples/02-play/play/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import "../src/colorful-button.vue";
1+
import "vue-play-loader!../src/colorful-button.vue";

0 commit comments

Comments
 (0)