SteamworkshopViewer/webpack.config.js
2025-03-09 17:48:39 +01:00

37 lines
1.2 KiB
JavaScript

const CspHtmlWebpackPlugin = require("csp-html-webpack-plugin");
module.exports = {
entry: './src/index.js',
output: {
filename: 'steam.js',
path: __dirname + '/public'
},
module: {
rules: [
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new CspHtmlWebpackPlugin({
'default-src': "'self' 'unsafe-eval' 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ws://localhost:8080",
'style-src': "'self' 'unsafe-eval' 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ws://localhost:8080"
})
],
devServer: {
port: 9010,
hot: true,
static: {
directory: __dirname + '/public',
publicPath: '/'
},
historyApiFallback: true
},
}