-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Define process.env.NODE_ENV as part of the vite build
This allows us to use Lux's IIFE distribution in <script src=""> without the error: "process is not defined" See environments variable section under https://vitejs.dev/guide/build.html#library-mode Co-authored-by: Christina Chortaria <[email protected]>
- Loading branch information
1 parent
9c1cfab
commit 42c3e6b
Showing
2 changed files
with
1 addition
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters