summaryrefslogtreecommitdiff
path: root/webpack.config.site.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-15 19:09:37 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-15 19:09:37 +0100
commit8792e9fe1c7ab76c35f9a18d866880ba3da2c13e (patch)
treefbdc78484f654ec344d10814cb83987c873d4360 /webpack.config.site.js
parent7c15f34186622410e25ee85c01d832e48e012140 (diff)
move frontend site folder. add video support
Diffstat (limited to 'webpack.config.site.js')
-rw-r--r--webpack.config.site.js54
1 files changed, 27 insertions, 27 deletions
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"],
+ },
+ },
+ ],
},
};