Alias import paths

This commit is contained in:
Alexis Sellier
2021-03-07 14:14:29 +01:00
parent a855b36aa8
commit 988704bc37
4 changed files with 13 additions and 8 deletions
+3
View File
@@ -4,6 +4,9 @@ module.exports = {
public: '/',
src: '/dist',
},
alias: {
'@app': './src',
},
plugins: [
'@snowpack/plugin-svelte'
],
+4 -3
View File
@@ -1,10 +1,11 @@
<script lang="javascript">
import { ethers } from 'ethers';
import { get } from 'svelte/store';
import { STATE, state } from './state.js';
import { error } from '../../error.js';
import { session } from '../../session.js';
import { error } from '@app/error.js';
import { session } from '@app/session.js';
import { registrar, registerName, registrationFee } from './registrar.js';
import { STATE, state } from './state.js';
import RegisterButton from './RegisterButton.svelte';
export let config = null;
+4 -3
View File
@@ -1,10 +1,11 @@
<script lang="javascript">
import { get } from 'svelte/store';
import { error } from '@app/error.js';
import { session } from '@app/session.js';
import { STATE, state } from './state.js';
import { registrar, registerName } from './registrar.js';
import { error } from '../../error.js';
import { session } from '../../session.js';
import Connect from '../../Connect.svelte';
import Connect from '@app/Connect.svelte';
export let subdomain = "";
export let config = null;
+2 -2
View File
@@ -2,8 +2,8 @@
// TODO: Two registration actions with same label
import { ethers } from "ethers";
import { STATE, state } from './state.js';
import { approveSpender, updateBalance } from '../../session.js';
import { ERROR } from '../../error.js';
import { approveSpender, updateBalance } from '@app/session.js';
import { ERROR } from '@app/error.js';
const registrarAbi = [
{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"commitment","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"CommitmentMade","type":"event"},