├── .npmrc ├── README.md ├── packages ├── beasties-webpack-plugin │ ├── test │ │ ├── fixtures │ │ │ ├── fs-access │ │ │ │ ├── index.js │ │ │ │ ├── dist │ │ │ │ │ └── style.css │ │ │ │ └── index.html │ │ │ ├── unused │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── additionalStylesheets │ │ │ │ ├── chunk.js │ │ │ │ ├── style.css │ │ │ │ ├── additional.css │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── raw │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── basic │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── external │ │ │ │ ├── index.js │ │ │ │ ├── index.html │ │ │ │ └── style.css │ │ │ ├── keyframes │ │ │ │ ├── index.js │ │ │ │ ├── index.html │ │ │ │ └── style.css │ │ │ └── inlineThreshold │ │ │ │ ├── index.js │ │ │ │ ├── index.html │ │ │ │ └── style.css │ │ ├── __snapshots__ │ │ │ ├── standalone.test.ts.snap │ │ │ └── index.test.ts.snap │ │ ├── standalone.test.ts │ │ ├── helpers.ts │ │ └── index.test.ts │ ├── src │ │ ├── util.js │ │ └── index.js │ ├── package.json │ └── README.md ├── beasties │ ├── test │ │ ├── src │ │ │ ├── styles2.css │ │ │ ├── index.html │ │ │ ├── prune-source.html │ │ │ ├── subpath-validation.html │ │ │ ├── media-validation.html │ │ │ ├── prune-source.css │ │ │ └── styles.css │ │ ├── serialize.test.ts │ │ ├── security.test.ts │ │ ├── parse.test.ts │ │ ├── __snapshots__ │ │ │ ├── preload.test.ts.snap │ │ │ └── beasties.test.ts.snap │ │ ├── beasties.bench.ts │ │ ├── preload.test.ts │ │ └── beasties.test.ts │ ├── src │ │ ├── util.ts │ │ ├── index.d.ts │ │ ├── types.ts │ │ ├── css.ts │ │ ├── dom.ts │ │ └── index.ts │ ├── package.json │ └── README.md └── vite-plugin-beasties │ ├── test │ ├── fixtures │ │ └── basic │ │ │ ├── main.js │ │ │ ├── style.css │ │ │ ├── other.html │ │ │ └── index.html │ └── index.test.ts │ ├── build.config.ts │ ├── package.json │ ├── LICENCE │ ├── README.md │ └── src │ └── index.ts ├── .gitignore ├── pnpm-workspace.yaml ├── renovate.json ├── eslint.config.mjs ├── .editorconfig ├── vitest.config.mts ├── .github └── workflows │ ├── provenance.yml │ ├── release.yml │ ├── autofix.yml │ └── ci.yml ├── tsconfig.json ├── package.json ├── CODE_OF_CONDUCT.md └── LICENSE /.npmrc: -------------------------------------------------------------------------------- 1 | shell-emulator=true -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | packages/beasties/README.md -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/fs-access/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/beasties/test/src/styles2.css: -------------------------------------------------------------------------------- 1 | body { 2 | height: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .DS_store 4 | next_sites 5 | coverage 6 | .vscode 7 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/unused/index.js: -------------------------------------------------------------------------------- 1 | console.log('empty file') 2 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/fs-access/dist/style.css: -------------------------------------------------------------------------------- 1 | div.foo{color:red} 2 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/additionalStylesheets/chunk.js: -------------------------------------------------------------------------------- 1 | import './additional.css' 2 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/additionalStylesheets/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | padding: 0px; 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite-plugin-beasties/test/fixtures/basic/main.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | console.log('Hello from Vite!') 4 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/raw/index.js: -------------------------------------------------------------------------------- 1 | import html from './index.html' 2 | 3 | module.exports = html 4 | -------------------------------------------------------------------------------- /packages/vite-plugin-beasties/test/fixtures/basic/style.css: -------------------------------------------------------------------------------- 1 | .test-content { 2 | color: blue; 3 | font-weight: bold; 4 | } 5 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/additionalStylesheets/additional.css: -------------------------------------------------------------------------------- 1 | .additional-style { 2 | font-size: 200%; 3 | } 4 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/basic/index.js: -------------------------------------------------------------------------------- 1 | document.body.appendChild(document.createTextNode('this counts as SSR')) 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/* 3 | ignoredBuiltDependencies: 4 | - esbuild 5 | onlyBuiltDependencies: 6 | - simple-git-hooks 7 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "github>danielroe/renovate" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/external/index.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | document.body.appendChild(document.createTextNode('this counts as SSR')) 4 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/keyframes/index.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | document.body.appendChild(document.createTextNode('this counts as SSR')) 4 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/inlineThreshold/index.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | document.body.appendChild(document.createTextNode('this counts as SSR')) 4 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import antfu from '@antfu/eslint-config' 3 | 4 | export default antfu().append({ 5 | files: ['**/test/**'], 6 | rules: { 7 | 'no-console': 'off', 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/additionalStylesheets/index.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | document.body.appendChild(document.createTextNode('this counts as SSR')) 4 | 5 | import('./chunk.js').then() 6 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/keyframes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |Welcome to my styled page!
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/inlineThreshold/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Welcome to my styled page!
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/provenance.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | permissions: 11 | contents: read 12 | jobs: 13 | check-provenance: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v6 17 | with: 18 | fetch-depth: 0 19 | - name: Check provenance downgrades 20 | uses: danielroe/provenance-action@a5a718233ca12eff67651fcf29a030bbbd5b3ca1 # v0.1.0 21 | with: 22 | fail-on-provenance-change: true 23 | -------------------------------------------------------------------------------- /packages/beasties-webpack-plugin/test/fixtures/additionalStylesheets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Welcome to my styled page!
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2022", 4 | "lib": [ 5 | "es2022", 6 | "dom" 7 | ], 8 | "moduleDetection": "force", 9 | "module": "preserve", 10 | "resolveJsonModule": true, 11 | "allowJs": true, 12 | "strict": true, 13 | "noImplicitOverride": true, 14 | "noUncheckedIndexedAccess": true, 15 | "noEmit": true, 16 | "esModuleInterop": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "isolatedModules": true, 19 | "verbatimModuleSyntax": true, 20 | "skipLibCheck": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/beasties/test/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |This is a paragraph
15 | 16 | 17 | 18 |This is a paragraph
15 | 16 | 17 | 18 |This is a paragraph
19 | 20 | 21 | 22 |