This commit is contained in:
ThatOneCalculator 2022-05-30 20:57:49 -07:00
commit 9daea49275
3 changed files with 5 additions and 72 deletions

4
.github/labeler.yml vendored
View File

@ -4,5 +4,9 @@
'🖥Client':
- packages/client/**/*
'🧪Test':
- cypress/**/*
- packages/backend/test/**/*
'‼️ wrong locales':
- any: ['locales/*.yml', '!locales/ja-JP.yml']

View File

@ -35,7 +35,7 @@
<script lang="ts" setup>
import { computed, defineExpose, ref } from 'vue';
import * as tinycolor from 'tinycolor2';
import tinycolor from 'tinycolor2';
import FormLink from '@/components/form/link.vue';
import FormSwitch from '@/components/form/switch.vue';
import FormSection from '@/components/form/section.vue';

View File

@ -1,71 +0,0 @@
/**
* webpack configuration
*/
const fs = require('fs');
const webpack = require('webpack');
class WebpackOnBuildPlugin {
constructor(callback) {
this.callback = callback;
}
apply(compiler) {
compiler.hooks.done.tap('WebpackOnBuildPlugin', this.callback);
}
}
const isProduction = process.env.NODE_ENV === 'production';
const locales = require('../../locales');
const meta = require('../../package.json');
module.exports = {
target: 'webworker',
entry: {
['sw-lib']: './src/lib.ts'
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
happyPackMode: true,
transpileOnly: true,
configFile: __dirname + '/tsconfig.json',
}
}]
}]
},
plugins: [
new webpack.ProgressPlugin({}),
new webpack.DefinePlugin({
_VERSION_: JSON.stringify(meta.version),
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
_ENV_: JSON.stringify(process.env.NODE_ENV),
_DEV_: process.env.NODE_ENV !== 'production',
_PERF_PREFIX_: JSON.stringify('Misskey:'),
}),
],
output: {
path: __dirname + '/../../built/_sw_dist_',
filename: `[name].js`,
publicPath: `/`,
pathinfo: false,
},
resolve: {
extensions: [
'.js', '.ts', '.json'
],
alias: {
'@': __dirname + '/src/',
}
},
resolveLoader: {
modules: ['node_modules']
},
devtool: false, //'source-map',
mode: isProduction ? 'production' : 'development'
};