diff --git a/.babelrc b/.babelrc
index 3ed94dff9..c13c5f627 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,5 +1,3 @@
{
- "presets": [
- ["env", { "modules": false }]
- ]
+ "presets": ["es2015"]
}
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 000000000..d0dd64cbb
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,4 @@
+{
+ "root": true,
+ "extends": "vue"
+}
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index b31f02096..000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = {
- root: true,
- extends: ['plugin:vue-libs/recommended'],
- rules: {
- indent: 'off',
- 'space-before-function-paren': 'off'
- }
-}
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 6313b56c5..000000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text=auto eol=lf
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index bd0e4f286..000000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 0a3ad19f4..000000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-name: 'ci'
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-jobs:
- unit-test:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os:
- - ubuntu-latest
- - macos-latest
- - windows-latest
- fail-fast: false
- name: "Unit Test: ${{ matrix.os }}"
- steps:
- - uses: actions/checkout@v2
-
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- with:
- version: 8
-
- - name: Set node version to 16
- uses: actions/setup-node@v2
- with:
- node-version: 16
- cache: 'pnpm'
-
- - run: pnpm install
-
- - name: Run unit tests
- run: pnpm run test
-
- - name: Set up webpack 5 tests
- run: npx json -f package.json -I -e "this.resolutions = {}, this.resolutions.webpack = '^5.0.0', this.devDependencies.webpack = '^5.0.0' "
-
- - name: Install webpack 5
- run: pnpm install --no-frozen-lockfile
-
- - name: Run unit tests for webpack 5
- run: pnpm run test && pnpm run test:match-resource
diff --git a/.gitignore b/.gitignore
index 914a2dab2..e45d3c71e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,7 @@
-.idea
-.DS_Store
-exploration
node_modules
-*.log
-example/dist
-docs/.vuepress/dist
-test/.cache
-.vscode
-TODOS
+npm-debug.log
+test/output
+docs/_book
+.DS_Store
+.idea
+*.iml
diff --git a/.npmignore b/.npmignore
deleted file mode 100644
index 6e52da593..000000000
--- a/.npmignore
+++ /dev/null
@@ -1,10 +0,0 @@
-example
-test
-*.yml
-*.log
-yarn.lock
-tsconfig.json
-docs
-.github
-.vscode
-TODOS
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 4b1b4d60d..000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,762 +0,0 @@
-
-# [15.11.1](https://github.com/vuejs/vue-loader/compare/v15.11.0...v15.11.1) (2023-10-18)
-
-### Bug Fixes
-
-* fix: fix read property error for accessing lang of script ([#2060](https://github.com/vuejs/vue-loader/pull/2060))
-
-
-
-# [15.11.0](https://github.com/vuejs/vue-loader/compare/v15.10.2...v15.11.0) (2023-10-18)
-
-### Features
-
-* A new `experimentalInlineMatchResource` option (webpack 5 only), which leverages webpack 5's [inline matchResource](https://webpack.js.org/api/loaders/#inline-matchresource) feature in the underlying implementation, and works well with the [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) feature. This also makes `vue-loader` compatible with [Rspack](https://www.rspack.dev/guide/vue). ([#2058](https://github.com/vuejs/vue-loader/pull/2058))
-
-
-
-# [15.10.2](https://github.com/vuejs/vue-loader/compare/v15.10.1...v15.10.2) (2023-08-23)
-
-### Bug Fixes
-
-* don't enable prettify by default if prettier 3 is detected ([aa2558d](https://github.com/vuejs/vue-loader/commit/aa2558d))
-
-
-
-# [15.10.1](https://github.com/vuejs/vue-loader/compare/v15.10.0...v15.10.1) (2022-11-14)
-
-### Bug Fixes
-
-* skip thread-loader when cloning js rules to template compilation pipeline, fixes ([fb6ff6e](https://github.com/vuejs/vue-loader/commit/fb6ff6e))
-
-
-
-# [15.10.0](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.6...v15.10.0) (2022-07-01)
-
-
-
-
-# [15.10.0-beta.6](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.5...v15.10.0-beta.6) (2022-06-20)
-
-
-### Bug Fixes
-
-* always pass id to stylePostLoader when possible ([364ad09](https://github.com/vuejs/vue-loader/commit/364ad09))
-
-
-
-
-# [15.10.0-beta.5](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.4...v15.10.0-beta.5) (2022-06-20)
-
-
-### Bug Fixes
-
-* css v-bind in production mode ([655e5f8](https://github.com/vuejs/vue-loader/commit/655e5f8))
-
-
-
-
-# [15.10.0-beta.4](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.3...v15.10.0-beta.4) (2022-06-20)
-
-
-### Features
-
-* support css v-bind (requires 2.7.0-beta.3) ([d653f3b](https://github.com/vuejs/vue-loader/commit/d653f3b))
-
-
-
-
-# [15.10.0-beta.3](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.2...v15.10.0-beta.3) (2022-06-16)
-
-
-### Bug Fixes
-
-* cache descriptor with correct resource path ([f6c83b5](https://github.com/vuejs/vue-loader/commit/f6c83b5))
-
-
-
-
-# [15.10.0-beta.2](https://github.com/vuejs/vue-loader/compare/v15.10.0-beta.1...v15.10.0-beta.2) (2022-06-16)
-
-
-### Features
-
-* use script-analyzed bindings when compiling template ([55de28c](https://github.com/vuejs/vue-loader/commit/55de28c))
-
-
-
-
-# [15.10.0-beta.1](https://github.com/vuejs/vue-loader/compare/v15.9.8...v15.10.0-beta.1) (2022-06-14)
-
-
-### Features
-
-* apply js loaders to compiled template code when used with 2.7 ([30464a8](https://github.com/vuejs/vue-loader/commit/30464a8))
-* compat for vue 2.7, support `
-
-
+``` js
+npm install -g vue-cli
+vue init webpack-simple hello
+cd hello
+npm install
+npm run dev
```
-There are many cool features provided by `vue-loader`:
-
-- Allows using other webpack loaders for each part of a Vue component, for example Sass for `
-```
-
-There are many cool features provided by `vue-loader`:
-
-- Allows using other webpack loaders for each part of a Vue component, for example Sass for `
+```
+
+Under the hood, the text content inside the `
+```
+
+However, note this makes your Vue component Webpack-specific and not compatible with Browserify and [vueify](https://github.com/vuejs/vueify). **If you intend to ship your Vue component as a reusable 3rd-party component, avoid using this syntax.**
diff --git a/docs/en/features/css-modules.md b/docs/en/features/css-modules.md
new file mode 100644
index 000000000..2e825c371
--- /dev/null
+++ b/docs/en/features/css-modules.md
@@ -0,0 +1,118 @@
+# CSS Modules
+
+> requires ^9.8.0
+
+[CSS Modules](https://github.com/css-modules/css-modules) is a popular system for modularizing and composing CSS. `vue-loader` provides first-class integration with CSS Modules as an alternative for simulated scoped CSS.
+
+### Usage
+
+Just add the `module` attribute to your `
+```
+
+This will turn on CSS Modules mode for `css-loader`, and the resulting class identifier object will be injected into the component as a computed property with the name `$style`. You can use it in your templates with a dynamic class binding:
+
+``` html
+
+
+ This should be red
+
+
+```
+
+Since it's a computed property, it also works with the object/array syntax of `:class`:
+
+``` html
+
+
+
+ Am I red?
+
+
+ Red and bold
+
+
+
+```
+
+And you can also access it from JavaScript:
+
+``` html
+
+```
+
+Refer to the [CSS Modules spec](https://github.com/css-modules/css-modules) for mode details such as [global exceptions](https://github.com/css-modules/css-modules#exceptions) and [composition](https://github.com/css-modules/css-modules#composition).
+
+### Custom Inject Name
+
+You can have more than one `
+
+
+```
+
+### Configuring `css-loader` Query
+
+CSS Modules are processed via [css-loader](ttps://github.com/webpack/css-loader). With `
+
+
+
hi
+
+```
+
+Into the following:
+
+``` html
+
+
+
+
hi
+
+```
+
+#### Notes
+
+1. You can include both scoped and non-scoped styles in the same component:
+
+ ``` html
+
+
+
+ ```
+
+2. A child component's root node will be affected by both the parent's scoped CSS and the child's scoped CSS.
+
+3. Partials are not affected by scoped styles.
+
+4. **Scoped styles do not eliminate the need for classes**. Due to the way browsers render various CSS selectors, `p { color: red }` will be many times slower when scoped (i.e. when combined with an attribute selector). If you use classes or ids instead, such as in `.example { color: red }`, then you virtually eliminate that performance hit. [Here's a playground](http://stevesouders.com/efws/css-selectors/csscreate.php) where you can test the differences yourself.
+
+5. **Be careful with descendant selectors in recursive components!** For a CSS rule with the selector `.a .b`, if the element that matches `.a` contains a recursive child component, then all `.b` in that child component will be matched by the rule.
diff --git a/docs/en/options.md b/docs/en/options.md
new file mode 100644
index 000000000..6789e7c71
--- /dev/null
+++ b/docs/en/options.md
@@ -0,0 +1,157 @@
+# Options Reference
+
+## Usage Difference Between Webpack 1 & 2
+
+For Webpack 1.x: add a root `vue` block in your Webpack config:
+
+``` js
+module.exports = {
+ // ...
+ vue: {
+ // vue-loader options
+ }
+}
+```
+
+For Webpack 2 (^2.1.0-beta.25):
+
+``` js
+module.exports = {
+ // ...
+ module: {
+ rules: [
+ {
+ test: /\.vue$/,
+ loader: 'vue',
+ options: {
+ // vue-loader options
+ }
+ }
+ ]
+ }
+}
+```
+
+### loaders
+
+- type: `Object`
+
+ An object specifying Webpack loaders to use for language blocks inside `*.vue` files. The key corresponds to the `lang` attribute for language blocks, if specified. The default `lang` for each type is:
+
+ - ``: `html`
+ - `
+
+
+```
+
+`vue-loader` will parse the file, extract each language block, pipe them through other loaders if necessary, and finally assemble them back into a CommonJS module whose `module.exports` is a Vue.js component options object.
+
+`vue-loader` supports using non-default languages, such as CSS pre-processors and compile-to-HTML template languages, by specifying the `lang` attribute for a language block. For example, you can use SASS for the style of your component like this:
+
+``` html
+
+```
+
+More details can be found in [Using Pre-Processors](../configurations/pre-processors.md).
+
+### Language Blocks
+
+#### ``
+
+- Default language: `html`.
+
+- Each `*.vue` file can contain at most one `` block at a time.
+
+- Contents will be extracted as a string and used as the `template` option for the compiled Vue component.
+
+#### `
+```
+
+Beware that `src` imports follow the same path resolution rules to CommonJS `require()` calls, which means for relative paths you need to start with `./`, and you can import resources directly from installed NPM packages, e.g:
+
+``` html
+
+
-```
-
-The `module` attribute instructs Vue Loader to inject the CSS modules locals object into the component as a computed property with the name `$style`. You can then use it in your templates with a dynamic class binding:
-
-``` vue
-
-
- This should be red
-
-
-```
-
-Since it's a computed property, it also works with the object/array syntax of `:class`:
-
-``` vue
-
-
-
- Am I red?
-
-
- Red and bold
-
-
-
-```
-
-And you can also access it from JavaScript:
-
-``` vue
-
-```
-
-Refer to the [CSS Modules spec](https://github.com/css-modules/css-modules) for mode details such as [global exceptions](https://github.com/css-modules/css-modules#exceptions) and [composition](https://github.com/css-modules/css-modules#composition).
-
-## Opt-in Usage
-
-If you only want to use CSS Modules in some of your Vue components, you can use a `oneOf` rule and check for the `module` string in `resourceQuery`:
-
-``` js
-// webpack.config.js -> module.rules
-{
- test: /\.css$/,
- oneOf: [
- // this matches `
-
-
-```
diff --git a/docs/guide/custom-blocks.md b/docs/guide/custom-blocks.md
deleted file mode 100644
index f34c18317..000000000
--- a/docs/guide/custom-blocks.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# Custom Blocks
-
-You can define custom language blocks inside `*.vue` files. Loaders applied for a custom block are matched based on the `lang` attribute of the block, the block's tag name, and the rules in your webpack config.
-
-If a `lang` attribute is specified, the custom block will be matched as a file with the `lang` as its extension.
-
-You can also use `resourceQuery` to match a rule against a custom block with no `lang`. For example, to match against `` custom blocks:
-
-``` js
-{
- module: {
- rules: [
- {
- resourceQuery: /blockType=foo/,
- loader: 'loader-to-use'
- }
- ]
- }
-}
-```
-
-If a matching rule is found for a custom block, it will be processed; otherwise the custom block will be silently ignored.
-
-Additionally, if the custom block exports a function as the final result after being processed by all the matching loaders, that function will be called with the component of the `*.vue` file as a parameter.
-
-## Example
-
-Here's an example of injecting the `` custom blocks into the component so that it's available during runtime.
-
-In order for the custom block content to be injected, we'll write a custom loader:
-
-``` js
-module.exports = function (source, map) {
- this.callback(
- null,
- `export default function (Component) {
- Component.options.__docs = ${
- JSON.stringify(source)
- }
- }`,
- map
- )
-}
-```
-
-Now we'll configure webpack to use our custom loader for `` custom blocks.
-
-``` js
-// wepback.config.js
-module.exports = {
- module: {
- rules: [
- {
- resourceQuery: /blockType=docs/,
- loader: require.resolve('./docs-loader.js')
- }
- ]
- }
-}
-```
-
-We are now able to access the `` block's content of imported components during runtime.
-
-``` vue
-
-
-
Hello
-
-
-
-This is the documentation for component B.
-
-```
-
-``` vue
-
-
-
-
-
{{ docs }}
-
-
-
-
-```
diff --git a/docs/guide/extract-css.md b/docs/guide/extract-css.md
deleted file mode 100644
index 7557392b7..000000000
--- a/docs/guide/extract-css.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# CSS Extraction
-
-::: tip
-Only apply CSS extraction for production so that you get CSS hot reload during development.
-:::
-
-## webpack 4
-
-``` bash
-npm install -D mini-css-extract-plugin
-```
-
-``` js
-// webpack.config.js
-var MiniCssExtractPlugin = require('mini-css-extract-plugin')
-
-module.exports = {
- // other options...
- module: {
- rules: [
- // ... other rules omitted
- {
- test: /\.css$/,
- use: [
- process.env.NODE_ENV !== 'production'
- ? 'vue-style-loader'
- : MiniCssExtractPlugin.loader,
- 'css-loader'
- ]
- }
- ]
- },
- plugins: [
- // ... Vue Loader plugin omitted
- new MiniCssExtractPlugin({
- filename: 'style.css'
- })
- ]
-}
-```
-
-Also see [mini-css-extract-plugin docs](https://github.com/webpack-contrib/mini-css-extract-plugin).
-
-## webpack 3
-
-``` bash
-npm install -D extract-text-webpack-plugin
-```
-
-``` js
-// webpack.config.js
-var ExtractTextPlugin = require("extract-text-webpack-plugin")
-
-module.exports = {
- // other options...
- module: {
- rules: [
- // ... other rules omitted
- {
- test: /\.css$/,
- loader: ExtractTextPlugin.extract({
- use: 'css-loader',
- fallback: 'vue-style-loader'
- })
- }
- ]
- },
- plugins: [
- // ... Vue Loader plugin omitted
- new ExtractTextPlugin("style.css")
- ]
-}
-```
-
-Also see [extract-text-webpack-plugin docs](https://github.com/webpack-contrib/extract-text-webpack-plugin).
diff --git a/docs/guide/functional.md b/docs/guide/functional.md
deleted file mode 100644
index afbdfb7a4..000000000
--- a/docs/guide/functional.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Functional Components
-
-Functional components defined as a Single-File Component in a `*.vue` file also receives proper template compilation, Scoped CSS and hot-reloading support.
-
-To denote a template that should be compiled as a functional component, add the `functional` attribute to the template block. This also allows omitting the `functional` option in the `
-
-
-```
-
-Использование `vue-loader` предоставляет множество интересных возможностей:
-
-- Позволяет использовать разнообразные загрузчики webpack для разных секций компонента Vue, например Sass для `
-```
-
-Атрибут `module` подскажет Vue Loader о необходимости внедрить CSS модуль в компонент в качестве вычисляемого свойства с именем `$style`. Вы можете использовать его в шаблонах для динамического добавления классов:
-
-``` vue
-
-
- Текст должен быть красным
-
-
-```
-
-Поскольку это вычисляемое свойство, оно будет работать с объектом/массивом в `:class`:
-
-``` vue
-
-
-
- Буду ли я красным?
-
-
- Красный и жирный
-
-
-
-```
-
-Вы также можете получить доступ в JavaScript:
-
-``` vue
-
-```
-
-Обратитесь к [спецификации CSS-модулей](https://github.com/css-modules/css-modules) для получения информации о [глобальных исключениях](https://github.com/css-modules/css-modules#exceptions) и [композиции](https://github.com/css-modules/css-modules#composition).
-
-## Опциональное использование
-
-Если вы хотите использовать CSS модули только в некоторых компонентах Vue, вы можете использовать правило `oneOf` и проверять наличие строки `module` внутри `resourceQuery`:
-
-``` js
-// webpack.config.js -> module.rules
-{
- test: /\.css$/,
- oneOf: [
- // это соответствует `
-
-
-```
diff --git a/docs/ru/guide/custom-blocks.md b/docs/ru/guide/custom-blocks.md
deleted file mode 100644
index 6ac91f677..000000000
--- a/docs/ru/guide/custom-blocks.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Пользовательские блоки
-
-Вы можете определять пользовательские блоки внутри файлов `*.vue`. Загрузчики, применяемые к такому блоку, будут определяться сопоставлением по атрибуту `lang` блока, имени тега блока, и правил в вашей конфигурации webpack.
-
-Если указан атрибут `lang`, пользовательский блок будет обработан как файл с расширением, указанном в `lang`.
-
-Вы также можете использовать `resourceQuery` для определения правила для блока без атрибута `lang`. Например, для сопоставления пользовательского блока ``:
-
-```js
-{
- module: {
- rules: [
- {
- resourceQuery: /blockType=foo/,
- loader: "loader-to-use"
- }
- ];
- }
-}
-```
-
-Если для пользовательского блока будет найдено правило — он будет им обработан; в противном случае пользовательский блок будет тихо проигнорирован.
-
-Кроме того, если пользовательский блок экспортирует функцию в качестве конечного результата после обработки всеми соответствующими загрузчиками, то эта функция будет вызываться с компонентом файла `*.vue` в качестве параметра.
-
-## Пример
-
-Небольшой пример внедрения пользовательского блока `` в компонент таким образом, что он будет доступен во время выполнения.
-
-Для внедрения содержимого пользовательского блока мы напишем собственный загрузчик:
-
-```js
-module.exports = function(source, map) {
- this.callback(
- null,
- `export default function (Component) {
- Component.options.__docs = ${JSON.stringify(source)}
- }`,
- map
- );
-};
-```
-
-Настроим webpack использовать наш загрузчик для пользовательских блоков ``.
-
-```js
-// wepback.config.js
-module.exports = {
- module: {
- rules: [
- {
- resourceQuery: /blockType=docs/,
- loader: require.resolve("./docs-loader.js")
- }
- ]
- }
-};
-```
-
-Теперь мы можем получить доступ к содержимому блока `` импортированного компонента на этапе выполнения.
-
-```vue
-
-
-
Hello
-
-
-
-This is the documentation for component B.
-
-```
-
-```vue
-
-
-
-
-
{{ docs }}
-
-
-
-
-```
diff --git a/docs/ru/guide/extract-css.md b/docs/ru/guide/extract-css.md
deleted file mode 100644
index 94f61d36d..000000000
--- a/docs/ru/guide/extract-css.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# Извлечение CSS в отдельный файл
-
-::: tip СОВЕТ
-Применяйте извлечение CSS в отдельный файл только в production, чтобы использовать горячую перезагрузку CSS на этапе разработки.
-:::
-
-## webpack 4
-
-``` bash
-npm install -D mini-css-extract-plugin
-```
-
-``` js
-// webpack.config.js
-var MiniCssExtractPlugin = require('mini-css-extract-plugin')
-
-module.exports = {
- // другие настройки...
- module: {
- rules: [
- // ... другие правила опущены
- {
- test: /\.css$/,
- use: [
- process.env.NODE_ENV !== 'production'
- ? 'vue-style-loader'
- : MiniCssExtractPlugin.loader,
- 'css-loader'
- ]
- }
- ]
- },
- plugins: [
- // ... плагин Vue Loader опущен
- new MiniCssExtractPlugin({
- filename: 'style.css'
- })
- ]
-}
-```
-
-Также смотрите [документацию mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin).
-
-## webpack 3
-
-``` bash
-npm install -D extract-text-webpack-plugin
-```
-
-``` js
-// webpack.config.js
-var ExtractTextPlugin = require("extract-text-webpack-plugin")
-
-module.exports = {
- // другие настройки...
- module: {
- rules: [
- // ... другие правила опущены
- {
- test: /\.css$/,
- loader: ExtractTextPlugin.extract({
- use: 'css-loader',
- fallback: 'vue-style-loader'
- })
- }
- ]
- },
- plugins: [
- // ... плагин Vue Loader опущен
- new ExtractTextPlugin("style.css")
- ]
-}
-```
-
-Также смотрите [документацию extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin).
diff --git a/docs/ru/guide/functional.md b/docs/ru/guide/functional.md
deleted file mode 100644
index 421979506..000000000
--- a/docs/ru/guide/functional.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Функциональные компоненты
-
-Функциональные компоненты, объявленные как однофайловые компоненты в файле `*.vue`, также получают правильную поддержку компиляции шаблона, локальный CSS и поддержку горячей перезагрузки.
-
-Чтобы обозначить шаблон, который должен быть скомпилирован как функциональный компонент, добавьте атрибут `functional` в тег шаблона. Это также позволяет опустить опцию `functional` в теге `
-
-
-
-
- Это может быть, например, документация для компонента
-
-```
-
-`vue-loader` парсит файл, извлекает каждую из секций, обрабатывает их при необходимости другими загрузчиками webpack, и в итоге собирает всё обратно в ES-модуль где экспорт по умолчанию будет объектом настроек компонента Vue.js.
-
-`vue-loader` предоставляет возможность использовать нестандартные языки, например пре-процессоры CSS и языки шаблонов компилируемые в HTML, указывая атрибут `lang` для секции файла. Например, вы можете использовать Sass для стилей вашего компонента:
-
-``` vue
-
-```
-
-Подробнее на странице [использования пре-процессоров](./guide/pre-processors.md).
-
-## Секции файла
-
-### Шаблон (template)
-
-- Каждый `*.vue` файл может содержать максимум один блок ``.
-
-- Содержимое извлекается, передаётся в `vue-template-compiler`, где предварительно будет скомпилировано в JavaScript render-функции, и наконец внедряется в описываемый компонент в секции `
-```
-
-Обратите внимание, что импорты через `src` следуют тем же правилам webpack по разрешению путей к модулям, что означает:
-
-- Относительные пути должны начинаться с `./`
-- Вы можете импортировать ресурсы из npm-зависимостей:
-
-``` vue
-
-
-
-
- This could be e.g. documentation for the component.
-
-```
-
-`vue-loader` will parse the file, extract each language block, pipe them through other loaders if necessary, and finally assemble them back into an ES Module whose default export is a Vue.js component options object.
-
-`vue-loader` supports using non-default languages, such as CSS pre-processors and compile-to-HTML template languages, by specifying the `lang` attribute for a language block. For example, you can use Sass for the style of your component like this:
-
-``` vue
-
-```
-
-More details can be found in [Using Pre-Processors](./guide/pre-processors.md).
-
-## Language Blocks
-
-### Template
-
-- Each `*.vue` file can contain at most one `` block at a time.
-
-- Contents will be extracted and passed on to `vue-template-compiler` and pre-compiled into JavaScript render functions, and finally injected into the exported component in the `
-```
-
-Beware that `src` imports follow the same path resolution rules to webpack module requests, which means:
-
-- Relative paths need to start with `./`
-- You can import resources from npm dependencies:
-
-``` vue
-
-
-```
-
-Vue Loader 还提供了很多酷炫的特性:
-
-- 允许为 Vue 组件的每个部分使用其它的 webpack loader,例如在 `
-```
-
-这个 `module` 特性指引 Vue Loader 作为名为 `$style` 的计算属性,向组件注入 CSS Modules 局部对象。然后你就可以在模板中通过一个动态类绑定来使用它了:
-
-``` vue
-
-