Skip to content

Commit d1c4224

Browse files
committed
update readme for src-import
1 parent 4b8e7f4 commit d1c4224

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
- [CSS Pre-Processors](#css-pre-processors)
3636
- [PostCSS](#postcss)
3737
- [Template Pre-Processors](#template-pre-processors)
38-
- [Style Imports](#style-imports)
38+
- [Src Imports](#src-imports)
3939
- [Asset URL Handling](#asset-url-handling)
4040
- [Scoped CSS](#scoped-css)
4141
- [Hot Reload](#hot-reload)
@@ -170,15 +170,16 @@ module.exports = {
170170

171171
For template pre-processors, you should install `template-html-loader` plus the raw templating engine. For example to use `jade`, you will need to install both `template-html-loader` and `jade` instead of `jade-loader`.
172172

173-
## Style Imports
173+
## Src Imports
174174

175-
If you want, you can separate your styles into a separate file and import it using the `src` attribute:
175+
If you want, you can separate your template and styles into separate files and import them using the `src` attribute:
176176

177177
``` html
178+
<template src="./template.html"></template>
178179
<style src="./style.css"></style>
179180
```
180181

181-
Beware that `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">`.
182+
Beware that `src` imports follow similar rules to `require()` calls, which means for relative paths you need to start with `./`, and you can import resources from installed NPM packages, e.g. `<style src="todomvc-app-css/index.css">`.
182183

183184
## Asset URL Handling
184185

0 commit comments

Comments
 (0)