Skip to content

Commit 39f322d

Browse files
committed
readme + bump 2.1.0 (because src import handling is a breaking change)
1 parent 72f1991 commit 39f322d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@ module.exports =
4747
</script>
4848
```
4949
50-
And you can import using the `src` attribute (note that there's no need for a `lang` attribute here, as Webpack will
51-
be used to determine which loader applies):
50+
And you can import using the `src` attribute:
5251
5352
``` html
54-
<style src="style.styl"></style>
53+
<style lang="stylus" src="./style.styl"></style>
5554
```
5655
56+
**NOTE**: Starting from version 2.1.0, `src` imports follow similar rules to `require()` calls, which means for relative paths you need to start with `./`, and you can import resources from node modules: `<style src="todomvc-app-css/index.css">`.
57+
5758
## Usage
5859
5960
Config Webpack:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-loader",
3-
"version": "2.0.3",
3+
"version": "2.1.0",
44
"description": "Vue.js component loader for Webpack",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)