bro.landing/ijl.config.js

51 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-disable @typescript-eslint/no-require-imports */
/* eslint-disable no-undef */
const path = require('path');
const pkg = require('./package');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const isProd = process.env.NODE_ENV === 'production';
module.exports = {
apiPath: 'stubs/api',
apps: {
main: {
version: 'master',
name: 'cleanName',
},
},
webpackConfig: {
entry: {
index: './src/index.tsx',
// terms страница не нужен JS, только HTML
},
output: {
publicPath: isProd
? 'https://static.brojs.ru/landing/main/'
: `/static/${pkg.name}/${process.env.VERSION || pkg.version}/`,
filename: '[name].js?[contenthash]',
},
plugins: [
// Главная страница (с React)
new HtmlWebpackPlugin({
template: './src/index.ejs',
filename: 'index.html',
chunks: ['index'],
}),
// Terms страница (чистый HTML без JS)
new HtmlWebpackPlugin({
template: './src/terms.html',
filename: 'terms.html',
inject: false, // Не инжектим JS
}),
new webpack.DefinePlugin({
IS_PROD: process.env.NODE_ENV === 'production',
}),
],
},
navigations: {},
features: {},
config: {},
};