[ci] yarn format
This commit is contained in:
parent
2da7078eff
commit
dfafbe54d7
1 changed files with 7 additions and 10 deletions
|
@ -26,7 +26,6 @@ export default {
|
|||
plugins: ['@snowpack/plugin-dotenv'],
|
||||
workspaceRoot: '../',
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
To **add your own** alias just define it on a new line, like so:
|
||||
|
@ -38,24 +37,22 @@ export default {
|
|||
alias: {
|
||||
components: './src/components',
|
||||
'~': './src',
|
||||
'@public': './public' // This can be virtually anything
|
||||
'@public': './public', // This can be virtually anything
|
||||
},
|
||||
plugins: ['@snowpack/plugin-dotenv'],
|
||||
workspaceRoot: '../',
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
| Key | Value |
|
||||
| ----- | ----- |
|
||||
| --------------------------- | ---------------------------------- |
|
||||
| The keyword you'll be using | The path it will get replaced with |
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Now just use the **defined** aliases in a file of your choice:
|
||||
|
||||
```js
|
||||
import '@public/assets/logo.svg';
|
||||
import MyComponent from 'components/MyComponent/MyComponent.tsx'
|
||||
import MyComponent from 'components/MyComponent/MyComponent.tsx';
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue