{"id":19012213,"url":"https://github.com/binaryify/vue-loader-example","last_synced_at":"2025-04-22T23:28:35.971Z","repository":{"id":74335006,"uuid":"45830797","full_name":"Binaryify/vue-loader-example","owner":"Binaryify","description":"vue-loader-example","archived":false,"fork":false,"pushed_at":"2015-12-29T14:54:44.000Z","size":22,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T16:03:58.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Binaryify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T10:21:14.000Z","updated_at":"2021-11-16T12:31:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b1a7a7f-3a66-4638-a7df-b804483844a6","html_url":"https://github.com/Binaryify/vue-loader-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fvue-loader-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fvue-loader-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fvue-loader-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fvue-loader-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Binaryify","download_url":"https://codeload.github.com/Binaryify/vue-loader-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250339634,"owners_count":21414394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:17:10.951Z","updated_at":"2025-04-22T23:28:35.947Z","avatar_url":"https://github.com/Binaryify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-loader example\n\n\u003e Example using [vue-loader](https://github.com/vuejs/vue-loader) with [Webpack](http://webpack.github.io).\n\n## Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build for production with minification\nnpm run build\n\n# run unit tests\nnpm test\n```\n\n\n### sass/scss\u0026postcss\n```\nvue: {\n  loaders: {\n    js: 'babel!eslint',\n    scss: 'style!css!sass!postcss'\n  },\n  postcss: [require('cssnext')(),require('postcss-nested')(),require('postcss-mixins')()]\n}\n\n\u003cstyle scoped lang=\"scss\"\u003e\n.red{\n  .test{\n    color:blue !important;\n    transform:rotateX(30deg) rotateY(30deg) translateY(50px);\n  }\n}\n\u003c/style\u003e\n\n\u003c!-- retult: --\u003e\n\u003cstyle\u003e\n.red .test[_v-3def8906]{\n    color: blue !important;\n    -webkit-transform: rotateX(30deg) rotateY(30deg) translateY(50px);\n    transform: rotateX(30deg) rotateY(30deg) translateY(50px);\n}\n\u003c/style\u003e\n```\n\n#### ES2015 by Default\n\n`vue-loader` automatically applies Babel transforms to the JavaScript inside `*.vue` components. Write ES2015 today!\n\nThe default Babel options used for Vue.js components are:\n\n``` js\n{\n  presets: ['es2015'],\n  plugins: ['transform-runtime']\n}\n```\n\nIf you wish to mofidy this, you can add a `babel` field in your webpack config, which will be merged with the default options. For example:\n\n``` js\n// webpack.config.js\nmodule.exports = {\n  // other configs...\n  babel: {\n    // enable stage-0 features, make sure to install\n    // babel-preset-stage-0\n    presets: ['es2015', 'stage-0'],\n    plugins: ['transform-runtime']\n  }\n}\n```\n\n#### Using Per-file Pre-processors\n\nIf you only want to use pre-processors in a specific file, you can add an inline `lang` attribute to a language block:\n\n``` html\n\u003cstyle lang=\"stylus\"\u003e\n  /* use stylus here */\n\u003c/style\u003e\n```\n\nNote you will have to install `stylus-loader` so that Webpack can handle the compilation. The `lang` attribute will be used to automatically locate the loader to use, and you can pass Webpack loader queries in it as well:\n\n``` html\n\u003cstyle lang=\"sass?outputStyle=expanded\"\u003e\n  /* use sass here with expanded output */\n\u003c/style\u003e\n```\n\n#### Scoped CSS\n\n\u003e Experimental. Requires `vue-loader` ^4.0.0\n\nYou can add the `scoped` attribute to a `\u003cstyle\u003e` block to make it scoped to the current component. A few things to take note:\n\n1. You can include both scoped and non-scoped styles in the same component.\n\n2. A child component's root node will be affected by both the parent's scoped CSS and the child's scoped CSS.\n\n3. Partials are not affected by scoped styles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryify%2Fvue-loader-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinaryify%2Fvue-loader-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryify%2Fvue-loader-example/lists"}