From 76a504bb9c93f3c32031217628672ee71aaa0f32 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 14 Mar 2020 16:13:56 +0800 Subject: [PATCH] tweak webpack build --- .../{Toast.scss => Toast.module.scss} | 0 resources/assets/src/components/Toast.tsx | 2 +- .../{Viewer.scss => Viewer.module.scss} | 0 resources/assets/src/components/Viewer.tsx | 4 ++-- resources/assets/src/scripts/cli.tsx | 2 +- .../{terminal.scss => terminal.module.scss} | 0 .../{InfoBox.scss => InfoBox.module.scss} | 0 .../views/admin/PluginsManagement/InfoBox.tsx | 2 +- .../src/views/user/Dashboard/SignButton.tsx | 4 ++-- .../assets/src/views/user/Dashboard/index.tsx | 22 ++++++++--------- .../{score.scss => score.module.scss} | 0 .../src/views/user/Dashboard/scoreUtils.ts | 10 ++++---- .../src/views/user/OAuth/ModalCreate.tsx | 4 ++-- resources/assets/src/views/user/OAuth/Row.tsx | 10 ++++---- .../Players/{Row.scss => Row.module.scss} | 0 .../assets/src/views/user/Players/Row.tsx | 2 +- .../{Viewer2d.scss => Viewer2d.module.scss} | 0 .../src/views/user/Players/Viewer2d.tsx | 2 +- .../src/views/user/profile/deleteAccount.ts | 4 ++-- .../assets/src/views/user/profile/email.ts | 4 ++-- .../assets/src/views/user/profile/nickname.ts | 4 ++-- .../assets/src/views/user/profile/password.ts | 6 ++--- .../src/views/user/profile/resetAvatar.ts | 18 +++++++------- resources/assets/tests/ts-shims/net.ts | 24 ++++--------------- webpack.config.js | 2 +- 25 files changed, 55 insertions(+), 71 deletions(-) rename resources/assets/src/components/{Toast.scss => Toast.module.scss} (100%) rename resources/assets/src/components/{Viewer.scss => Viewer.module.scss} (100%) rename resources/assets/src/styles/{terminal.scss => terminal.module.scss} (100%) rename resources/assets/src/views/admin/PluginsManagement/{InfoBox.scss => InfoBox.module.scss} (100%) rename resources/assets/src/views/user/Dashboard/{score.scss => score.module.scss} (100%) rename resources/assets/src/views/user/Players/{Row.scss => Row.module.scss} (100%) rename resources/assets/src/views/user/Players/{Viewer2d.scss => Viewer2d.module.scss} (100%) diff --git a/resources/assets/src/components/Toast.scss b/resources/assets/src/components/Toast.module.scss similarity index 100% rename from resources/assets/src/components/Toast.scss rename to resources/assets/src/components/Toast.module.scss diff --git a/resources/assets/src/components/Toast.tsx b/resources/assets/src/components/Toast.tsx index e08b8db3..ebea5cd5 100644 --- a/resources/assets/src/components/Toast.tsx +++ b/resources/assets/src/components/Toast.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react' -import styles from './Toast.scss' +import styles from './Toast.module.scss' export type ToastType = 'success' | 'info' | 'warning' | 'error' diff --git a/resources/assets/src/components/Viewer.scss b/resources/assets/src/components/Viewer.module.scss similarity index 100% rename from resources/assets/src/components/Viewer.scss rename to resources/assets/src/components/Viewer.module.scss diff --git a/resources/assets/src/components/Viewer.tsx b/resources/assets/src/components/Viewer.tsx index bd73725b..bb078a52 100644 --- a/resources/assets/src/components/Viewer.tsx +++ b/resources/assets/src/components/Viewer.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from 'react' import * as skinview3d from 'skinview3d' -import { t } from '../scripts/i18n' -import styles from './Viewer.scss' +import { t } from '@/scripts/i18n' +import styles from './Viewer.module.scss' import SkinSteve from '../../../misc/textures/steve.png' export const PICTURES_COUNT = 7 diff --git a/resources/assets/src/scripts/cli.tsx b/resources/assets/src/scripts/cli.tsx index 3104c881..1a7a0335 100644 --- a/resources/assets/src/scripts/cli.tsx +++ b/resources/assets/src/scripts/cli.tsx @@ -5,7 +5,7 @@ import { FitAddon } from 'xterm-addon-fit' import { Shell } from 'blessing-skin-shell' import 'xterm/css/xterm.css' import Draggable from 'react-draggable' -import styles from '@/styles/terminal.scss' +import styles from '@/styles/terminal.module.scss' let launched = false diff --git a/resources/assets/src/styles/terminal.scss b/resources/assets/src/styles/terminal.module.scss similarity index 100% rename from resources/assets/src/styles/terminal.scss rename to resources/assets/src/styles/terminal.module.scss diff --git a/resources/assets/src/views/admin/PluginsManagement/InfoBox.scss b/resources/assets/src/views/admin/PluginsManagement/InfoBox.module.scss similarity index 100% rename from resources/assets/src/views/admin/PluginsManagement/InfoBox.scss rename to resources/assets/src/views/admin/PluginsManagement/InfoBox.module.scss diff --git a/resources/assets/src/views/admin/PluginsManagement/InfoBox.tsx b/resources/assets/src/views/admin/PluginsManagement/InfoBox.tsx index 83093a00..39367151 100644 --- a/resources/assets/src/views/admin/PluginsManagement/InfoBox.tsx +++ b/resources/assets/src/views/admin/PluginsManagement/InfoBox.tsx @@ -1,7 +1,7 @@ import React from 'react' import { t } from '@/scripts/i18n' import { Plugin } from './types' -import styles from './InfoBox.scss' +import styles from './InfoBox.module.scss' interface Props { plugin: Plugin diff --git a/resources/assets/src/views/user/Dashboard/SignButton.tsx b/resources/assets/src/views/user/Dashboard/SignButton.tsx index f8c6df4f..7600fd2e 100644 --- a/resources/assets/src/views/user/Dashboard/SignButton.tsx +++ b/resources/assets/src/views/user/Dashboard/SignButton.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { trans } from '../../../scripts/i18n' +import { t } from '@/scripts/i18n' import * as scoreUtils from './scoreUtils' interface Props { @@ -28,7 +28,7 @@ const SignButton: React.FC = props => { onClick={props.onClick} >