Skip to content

Commit

Permalink
update migrations.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SeferMirza committed Oct 20, 2023
1 parent 17ed5a4 commit d9892a5
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ to export sass files first install sass

`npm install sass`

then put your style files under `/assets`

You can then configure `nuxt.config.ts` as follows to apply your styles and
access style variables from vue files.

Expand All @@ -169,18 +171,38 @@ export default defineNuxtConfig({
})
```

put your style files under `/assets`

### env files

By adding environment files, you can export these files during build and use
your constant values during build or runtime.

`npx nuxi dev --dotenv .env.local`
After getting your env files from the old project, give the relevant `.env`
files to the places you want in the scripts in `package.json` to apply them to
the project.

`"dev": "npx nuxi dev --dotenv .env.local"`

If you write your constant values with the prefix `NUXT` and `NUXT_PUBLIC` in
your env file, nuxt will match them automatically.

`NUXT_PUBLIC_BASE_URL=/`

must have a match in `runtimeConfig.public` for automatic mapping. It should
be as follows.

```ts
export default defineNuxtConfig({
runtimeConfig: {
public: {
baseUrl: ""
}
},
});
```

To access it from somewhere other than `runtimeConfig`, you can call it as
`process.env.NUXT_PUBLIC_BASE_URL`.

### Prebuild

In the preparation phase with prebuild, we prepare the markdowns at the root
Expand All @@ -199,6 +221,12 @@ export default defineNuxtConfig({
})
```

> :information_source:
>
> Don't forget to install the dependencies of the prebuild.
> `npm install -D log-symbols`
> `npm install -D @mermaid-js/mermaid-cli`
### Components

You must do this configuration to access globally when writing and using
Expand Down

0 comments on commit d9892a5

Please sign in to comment.