From 8792e9fe1c7ab76c35f9a18d866880ba3da2c13e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 15 Mar 2021 19:09:37 +0100 Subject: move frontend site folder. add video support --- webpack.config.site.js | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'webpack.config.site.js') diff --git a/webpack.config.site.js b/webpack.config.site.js index 6416ee9..80d84d2 100644 --- a/webpack.config.site.js +++ b/webpack.config.site.js @@ -1,24 +1,24 @@ -require('dotenv').config() +require("dotenv").config(); -const webpack = require('webpack') -const path = require('path') -const TerserPlugin = require('terser-webpack-plugin') +const webpack = require("webpack"); +const path = require("path"); +const TerserPlugin = require("terser-webpack-plugin"); module.exports = { mode: "production", entry: { - main: './frontend/app/site/index.js' + main: "./frontend/site/index.js", }, output: { - path: path.resolve(__dirname, 'static/js/dist'), - filename: 'bundle.js' + path: path.resolve(__dirname, "static/js/dist"), + filename: "bundle.js", }, plugins: [ new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify("production"), + "process.env.NODE_ENV": JSON.stringify("production"), // 'process.env.S3_HOST': JSON.stringify(process.env.S3_HOST || ""), // 'process.env.API_HOST': JSON.stringify(process.env.API_HOST || ""), - '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })' + __REACT_DEVTOOLS_GLOBAL_HOOK__: "({ isDisabled: true })", }), new TerserPlugin(), new webpack.optimize.AggressiveMergingPlugin(), @@ -28,40 +28,40 @@ module.exports = { ], optimization: { minimize: true, - minimizer: [new TerserPlugin({ - terserOptions: { - compress: { - // drop_console: true, - } - } - })], + minimizer: [ + new TerserPlugin({ + terserOptions: { + compress: { + // drop_console: true, + }, + }, + }), + ], }, resolve: { alias: { // "react": "preact/compat", // "react-dom/test-utils": "preact/test-utils", // "react-dom": "preact/compat", - } + }, }, - devtool: 'cheap-module-source-map', + devtool: "cheap-module-source-map", module: { rules: [ { test: /\.css$/, - use: ['style-loader', 'css-loader'] + use: ["style-loader", "css-loader"], }, { test: /\.js$/, // include: path.resolve(__dirname, 'client'), exclude: /(node_modules|bower_components|build)/, - loader: 'babel-loader', + loader: "babel-loader", options: { - presets: ['@babel/preset-react'], - plugins: [ - "@babel/plugin-transform-runtime", - ], - } - } - ] + presets: ["@babel/preset-react"], + plugins: ["@babel/plugin-transform-runtime"], + }, + }, + ], }, }; -- cgit v1.2.3-70-g09d2