{"id":16551249,"url":"https://github.com/michaelcurrin/css-loader-quickstart","last_synced_at":"2026-05-02T08:32:16.327Z","repository":{"id":93178037,"uuid":"371050803","full_name":"MichaelCurrin/css-loader-quickstart","owner":"MichaelCurrin","description":"Starter template for using CSS Loader and Webpack ","archived":false,"fork":false,"pushed_at":"2021-05-26T15:06:30.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-04T15:47:30.292Z","etag":null,"topics":["css","css-loader","javascript","quickstart","template","webpack"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelCurrin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-26T13:50:29.000Z","updated_at":"2021-05-26T15:06:32.000Z","dependencies_parsed_at":"2023-03-03T10:45:19.619Z","dependency_job_id":null,"html_url":"https://github.com/MichaelCurrin/css-loader-quickstart","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/MichaelCurrin/css-loader-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCurrin%2Fcss-loader-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCurrin%2Fcss-loader-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCurrin%2Fcss-loader-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCurrin%2Fcss-loader-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelCurrin","download_url":"https://codeload.github.com/MichaelCurrin/css-loader-quickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCurrin%2Fcss-loader-quickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32528220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["css","css-loader","javascript","quickstart","template","webpack"],"created_at":"2024-10-11T19:36:44.336Z","updated_at":"2026-05-02T08:32:16.311Z","avatar_url":"https://github.com/MichaelCurrin.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSS Loader Quickstart\n\u003e Starter template for using CSS Loader and Webpack\n\n[![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/css-loader-quickstart?include_prereleases=\u0026sort=semver)](https://github.com/MichaelCurrin/css-loader-quickstart/releases/)\n[![License](https://img.shields.io/badge/License-MIT-blue)](#license)\n\n[![Made with Node.js](https://img.shields.io/badge/Node.js-\u003e=12-blue?logo=node.js\u0026logoColor=white)](https://nodejs.org)\n\n[![Package - webpack](https://img.shields.io/github/package-json/dependency-version/MichaelCurrin/css-loader-quickstart/dev/webpack)](https://www.npmjs.com/package/webpack)\n[![Package - css-loader](https://img.shields.io/github/package-json/dependency-version/MichaelCurrin/css-loader-quickstart/dev/css-loader)](https://www.npmjs.com/package/css-loader)\n[![Package - style-loader](https://img.shields.io/github/package-json/dependency-version/MichaelCurrin/css-loader-quickstart/dev/style-loader)](https://www.npmjs.com/package/style-loader)\n\n\n## Use this project\n\n\u003cdiv align=\"center\"\u003e\n\n[![Use this template](https://img.shields.io/badge/Generate-Use_this_template-2ea44f?style=for-the-badge)](https://github.com/MichaelCurrin/css-loader-quickstart/generate)\n\n\u003c/div\u003e\n\n\n## Installation\n\nInstall Node.js.\n\nClone the repo.\n\nInstall project packages with:\n\n```sh\n$ npm install\n```\n\n\n## Usage\n\n### Watch\n\nBundle the JS and CSS with webpack. This will watch continuously.\n\n```sh\n$ npm start\n```\n\nThen open a dev server in the `dist` directory and open localhost in your browser.\n\n### Build\n\nDo a build and then stop.\n\n```sh\n$ npm run build\n```\n\nYou might want to switch to using production settings in the Webpack config.\n\n\n## About\n\n## How it works\n\nWhen running Webpack the JS file [index.js](/src/index.js) and styling imports gt bundled as a single JS file. In particular, there is a local CSS file ([styles.css](/src/styles.css)) and an installed CSS dependency (`sanitize.css`).\n\nThe CSS gets added to the JS because of two CSS loading dependencies that are installed and also because Webpack is configured to use those dependencies for CSS files. See [webpack.config.js](/webpack.config.js).\n\nWhen the bundled JS file (`bundle.js`) gets loaded on the frontend, the JS will inserted the CSS into the DOM for you. So you don't need to add a style or link tag yourself.\n\n### Dependencies\n\n- Webpack\n    - https://webpack.js.org/\n- CSS Loader\n    - https://github.com/webpack-contrib/css-loader\n    - Using default config settings from README\n- Style Loader\n    - https://webpack.js.org/loaders/style-loader/\n    - Must be installed since that it is the config\n- Sanitize CSS\n    - https://csstools.github.io/sanitize.css/\n\n### Set up\n\nSet the dependencies up in a fresh project with:\n\n```sh\n$ npm i -D webpack webpack-cli css-loader style-loader\n$ npm i sanitize.css\n```\n\n\n## License\n\nReleased under [MIT](/LICENSE) by [@MichaelCurrin](https://github.com/MichaelCurrin).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcurrin%2Fcss-loader-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelcurrin%2Fcss-loader-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcurrin%2Fcss-loader-quickstart/lists"}