mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
* Update to version 4 of webpack. * For that matter, update *every dependency* to the latest available version. * Remove the babel build target for Edge, as it doesn't seem to be necessary with webpack 4 and tenser. * Add support for optional chaining and nullish coalescing via Babel transformations. * Update the clips domain version to work better. Or at all, really. * Remove unused code from i18n. * Remove the last `<style>` from vue component files. They don't work that way now anyways. * Fix a bug in Raven's report handler. * Fix a bug with the menu button in browsers that don't understand `:scope` within `querySelector()`.
67 lines
No EOL
1.2 KiB
JavaScript
67 lines
No EOL
1.2 KiB
JavaScript
/* eslint-disable */
|
|
const path = require('path');
|
|
const merge = require('webpack-merge');
|
|
const prod = require('./webpack.web.prod.js');
|
|
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
|
|
/* global module */
|
|
|
|
module.exports = merge(prod, {
|
|
plugins: [
|
|
new CopyPlugin([
|
|
{
|
|
from: './src/entry.js',
|
|
to: 'script.js'
|
|
}
|
|
]),
|
|
new webpack.DefinePlugin({
|
|
__git_commit__: null
|
|
})
|
|
],
|
|
|
|
devServer: {
|
|
https: true,
|
|
port: 8000,
|
|
compress: true,
|
|
inline: false,
|
|
|
|
allowedHosts: [
|
|
'.twitch.tv',
|
|
'.frankerfacez.com'
|
|
],
|
|
|
|
contentBase: path.join(__dirname, 'dev_cdn'),
|
|
publicPath: '/script/',
|
|
|
|
proxy: {
|
|
'**': {
|
|
target: 'https://cdn.frankerfacez.com/',
|
|
changeOrigin: true
|
|
}
|
|
},
|
|
|
|
before(app) {
|
|
// Because the headers config option is broken.
|
|
app.get('/*', (req, res, next) => {
|
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
next();
|
|
});
|
|
|
|
app.get('/dev_server', (req, res) => {
|
|
res.json({
|
|
path: process.cwd(),
|
|
version: 2
|
|
})
|
|
});
|
|
}
|
|
},
|
|
|
|
output: {
|
|
publicPath: '//localhost:8000/script/',
|
|
filename: '[name].js',
|
|
jsonpFunction: 'ffzWebpackJsonp',
|
|
crossOriginLoading: 'anonymous'
|
|
}
|
|
}) |