Skip to content

Commit

Permalink
Merge pull request #325 from pulibrary/define-node-enve
Browse files Browse the repository at this point in the history
[Build] Define process.env.NODE_ENV as part of the vite build
  • Loading branch information
christinach authored Aug 7, 2024
2 parents 9c1cfab + 42c3e6b commit 24a23ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions docs/adding_lux.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ If you can't use an import map and have to use `<script src>` then from cdn use
Add the following `<script>` tags after the `<head>` tag:
```
<script>
window.process = {
env: {
NODE_ENV: 'production'
}
};
</script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://unpkg.com/[email protected]/dist/lux-styleguidist.iife.js"></script>
```
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineConfig({
hook: "writeBundle",
}),
],
define: { "process.env.NODE_ENV": '"production"' },
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
Expand Down

0 comments on commit 24a23ac

Please sign in to comment.