Skip to content

Commit

Permalink
fix: vite build process
Browse files Browse the repository at this point in the history
  • Loading branch information
wuda-io committed Nov 13, 2024
1 parent 27521f0 commit 3147f4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ pnpm preview
### New Release (for Maintainers)

- Execute the release process in the core package incl. releasing on npm
- Update versions in **getting-started.html**, **partials/navbar.html**
- Switch to branch **v2-dev** and also pull newest package in [packages/materialize]()
- Update versions in [src/getting-started.html](), [partials/navbar.html]()
- Run docs locally and check manually
- Make commit to dev (message: "chore: release 2.X.X")
- Make PR in GitHub from dev -> main
- Make PR from dev -> main
- Merge the PR
- Party and spread the news via social media channels 🎉
- Spread news via social media channels
19 changes: 11 additions & 8 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ export default {
rollupOptions: {
//this is needed for "vite publish" to include all html files, not only the index.
input: Object.fromEntries(
globSync("*.html").map((file) => [
// This remove the file extension from each
// file, so e.g. nested/foo.js becomes nested/foo
file.slice(0, file.length - path.extname(file).length),
// This expands the relative paths to absolute paths, so e.g.
// src/nested/foo becomes /project/src/nested/foo.js
fileURLToPath(new URL(file, import.meta.url)),
])
globSync("src/*.html").map((file) => {
return [
// This remove the file extension from each
// file, so e.g. nested/foo.js becomes nested/foo
file.slice(0, file.length - path.extname(file).length),
// This expands the relative paths to absolute paths, so e.g.
// src/nested/foo becomes /project/src/nested/foo.js
fileURLToPath(new URL(file, import.meta.url)),
];
})
),
},
outDir: "./../dist", // relative to rootDir
},
};

0 comments on commit 3147f4d

Please sign in to comment.