Просмотр исходного кода

Merge pull request #5040 from overleaf/jpa-web-templates-page

[web] v2-templates module: refactor frontend entrypoint into page

GitOrigin-RevId: 2efe344167cba3111eb516ebc2dfadd82347f776
Jakob Ackermann 5 лет назад
Родитель
Сommit
23c4f9462b
1 измененных файлов с 0 добавлено и 14 удалено
  1. 0 14
      services/web/webpack.config.js

+ 0 - 14
services/web/webpack.config.js

@@ -1,4 +1,3 @@
-const fs = require('fs')
 const path = require('path')
 const glob = require('glob')
 const webpack = require('webpack')
@@ -8,8 +7,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 
 const PackageVersions = require('./app/src/infrastructure/PackageVersions')
 
-const MODULES_PATH = path.join(__dirname, '/modules')
-
 // Generate a hash of entry points, including modules
 const entryPoints = {
   serviceWorker: './frontend/js/serviceWorker.js',
@@ -22,17 +19,6 @@ const entryPoints = {
   'light-style': './frontend/stylesheets/light-style.less',
 }
 
-// Attempt to load frontend entry-points from modules, if they exist
-if (fs.existsSync(MODULES_PATH)) {
-  fs.readdirSync(MODULES_PATH).reduce((acc, module) => {
-    const entryPath = path.join(MODULES_PATH, module, '/frontend/js/index.js')
-    if (fs.existsSync(entryPath)) {
-      acc[module] = entryPath
-    }
-    return acc
-  }, entryPoints)
-}
-
 // Add entrypoints for each "page"
 glob
   .sync(path.join(__dirname, 'modules/*/frontend/js/pages/**/*.js'))