Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

relative base fails #11

Description

@wighawag

Getting this issue when using

export default defineConfig({
  plugins: [sri()],
  base: "./",
});

vite v5.0.4 building for production...
✓ 3 modules transformed.
[vite:build-html] Cannot read properties of undefined (reading 'code')
✓ built in 70ms
error during build:
TypeError: Cannot read properties of undefined (reading 'code')
    at calculateIntegrityHashes (file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/@small-tech+vite-plugin-sri@1.0.1/node_modules/@small-tech/vite-plugin-sri/index.js:46:31)
    at $.asyncForEach (file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/@small-tech+vite-plugin-sri@1.0.1/node_modules/@small-tech/vite-plugin-sri/index.js:54:17)
    at transformIndexHtml (file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/@small-tech+vite-plugin-sri@1.0.1/node_modules/@small-tech/vite-plugin-sri/index.js:62:21)
    at applyHtmlTransforms (file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/vite@5.0.4/node_modules/vite/dist/node/chunks/dep-4RECYSE1.js:38687:27)
    at Object.generateBundle (file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/vite@5.0.4/node_modules/vite/dist/node/chunks/dep-4RECYSE1.js:38506:32)
    at file:///home/wighawag/dev/github.com/wighawag/onboard-wallet/node_modules/.pnpm/rollup@4.6.1/node_modules/rollup/dist/es/shared/node-entry.js:18606:40
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
^C ELIFECYCLE  Command failed.

works with

export default defineConfig({
  plugins: [sri()],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions