mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
* Added: Setting to change the height of chat actions. * Added: Profiles can now be toggled via hotkey. * Added: Profiles can now be imported from URL as well as File. * Added: Profiles with update URLs can have automatic updates disabled. * Fixed: Support for the `clips.twitch.tv` domain. * Fixed: Badges that make use of foreground text are no longer white in light themes. * Fixed: Mod Icons appearing smaller than normal. * Changed: Allow several types of actions, unrelated to moderation, to be used on a person's own chat messages. * Changed: Better warn users in the Control Center when the current profile is set to automatically update. * Changed: Make the FFZ Control Center remember which profile is selected when re-opening / refreshing. * API Added: Add-ons can now target specific supported flavors. Choices thus far are `main` and `clips`. * API Added: The `site.menu_button` now has `addToast(...)` and can display multiple toasts. Toasts can also time out. * API Fixed: `openFile(...)` never resolving if the user closes the dialog without selecting a file.
143 lines
No EOL
2.8 KiB
JavaScript
143 lines
No EOL
2.8 KiB
JavaScript
const webpack = require('webpack');
|
|
const path = require('path');
|
|
const semver = require('semver');
|
|
|
|
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
|
|
|
/* global process module __dirname */
|
|
|
|
const VERSION = semver.parse(require('./package.json').version);
|
|
const PRODUCTION = process.env.NODE_ENV === 'production';
|
|
|
|
const ENTRY_POINTS = {
|
|
bridge: './src/bridge.js',
|
|
player: './src/player.js',
|
|
avalon: './src/main.js',
|
|
clips: './src/clips.js'
|
|
};
|
|
|
|
module.exports = {
|
|
entry: ENTRY_POINTS,
|
|
resolve: {
|
|
extensions: ['.js', '.jsx'],
|
|
alias: {
|
|
res: path.resolve(__dirname, 'res/'),
|
|
styles: path.resolve(__dirname, 'styles/'),
|
|
root: __dirname,
|
|
src: path.resolve(__dirname, 'src/'),
|
|
utilities: path.resolve(__dirname, 'src/utilities/')
|
|
}
|
|
},
|
|
externals: [
|
|
function(context, request, callback) {
|
|
if ( request === 'vue' && ! /utilities/.test(context) )
|
|
return callback(null, 'root ffzVue');
|
|
callback();
|
|
}
|
|
],
|
|
output: {
|
|
chunkFilename: '[name].[chunkhash].js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
jsonpFunction: 'ffzWebpackJsonp',
|
|
crossOriginLoading: 'anonymous'
|
|
},
|
|
optimization: {
|
|
splitChunks: {
|
|
chunks(chunk) {
|
|
return ! Object.keys(ENTRY_POINTS).includes(chunk.name);
|
|
},
|
|
cacheGroups: {
|
|
vendors: false
|
|
}
|
|
}
|
|
},
|
|
plugins: [
|
|
new VueLoaderPlugin(),
|
|
new webpack.ExtendedAPIPlugin(),
|
|
new webpack.DefinePlugin({
|
|
__version_major__: VERSION.major,
|
|
__version_minor__: VERSION.minor,
|
|
__version_patch__: VERSION.patch,
|
|
__version_prerelease__: VERSION.prerelease
|
|
}),
|
|
],
|
|
module: {
|
|
rules: [{
|
|
test: /\.s?css$/,
|
|
use: [{
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: PRODUCTION ? '[name].[hash].css' : '[name].css'
|
|
}
|
|
}, {
|
|
loader: 'extract-loader'
|
|
}, {
|
|
loader: 'css-loader',
|
|
options: {
|
|
sourceMap: true
|
|
}
|
|
}, {
|
|
loader: 'sass-loader',
|
|
options: {
|
|
sourceMap: true
|
|
}
|
|
}]
|
|
},
|
|
{
|
|
test: /\.json$/,
|
|
include: /src/,
|
|
type: 'javascript/auto',
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: PRODUCTION ? '[name].[hash].json' : '[name].json'
|
|
}
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
cacheDirectory: true
|
|
}
|
|
},
|
|
{
|
|
test: /\.jsx$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
cacheDirectory: true,
|
|
plugins: [
|
|
['@babel/plugin-transform-react-jsx', {
|
|
pragma: 'createElement'
|
|
}]
|
|
]
|
|
}
|
|
},
|
|
{
|
|
test: /\.(graphql|gql)$/,
|
|
exclude: /node_modules/,
|
|
loader: 'graphql-tag/loader'
|
|
},
|
|
{
|
|
test: /\.(?:eot|ttf|woff|woff2)$/,
|
|
use: [{
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: PRODUCTION ? '[name].[hash].[ext]' : '[name].[ext]'
|
|
}
|
|
}]
|
|
},
|
|
{
|
|
test: /\.md$/,
|
|
loader: 'raw-loader'
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
loader: 'raw-loader'
|
|
},
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader'
|
|
}]
|
|
}
|
|
} |