PR-753737: moviendo toda la logica de front-end a src.

This commit is contained in:
Alejandro Lembke Barrientos 2022-04-13 20:12:15 +00:00
parent e5ffd7c61d
commit f7a26dbc6a
13 changed files with 12 additions and 9 deletions

11
.gitignore vendored
View File

@ -1,6 +1,9 @@
#node_modules ignore #node_modules ignore
node_modules src/node_modules
server/node_modules
#.envs #.envs
.env src/.env
#build server/.env
/build #builds
src/build
server/build

View File

@ -1,11 +1,11 @@
const path = require('path'); const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { config: { portDev, portReloadDev } } = require('./src/config') const { config: { portDev, portReloadDev } } = require('./config')
module.exports = { module.exports = {
entry: './src/index.js', entry: './frontend/index.js',
output: { output: {
path: path.resolve(__dirname, 'build'), path: path.resolve(__dirname, 'build'),
filename: 'bundle.js', filename: 'bundle.js',
@ -50,7 +50,7 @@ module.exports = {
], ],
devServer: { devServer: {
static: { static: {
directory: path.join(__dirname, 'dist') directory: path.join(__dirname, 'build')
}, },
allowedHosts: "all", allowedHosts: "all",
compress: true, compress: true,

View File

@ -6,7 +6,7 @@ const TerserPlugin = require('terser-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = { module.exports = {
entry: './src/index.js', entry: './frontend/index.js',
output: { output: {
path: path.resolve(__dirname, 'build'), path: path.resolve(__dirname, 'build'),
filename: 'bundle.js', filename: 'bundle.js',
@ -16,7 +16,7 @@ module.exports = {
extensions: ['.js', '.jsx'], extensions: ['.js', '.jsx'],
alias: { alias: {
'@components': path.resolve(__dirname, 'src/components/'), '@components': path.resolve(__dirname, 'src/components/'),
'@styles': path.resolve(__dirname, 'src/styles/'), '@styles': path.resolve(__dirname, 'frontend/styles/'),
} }
}, },
mode: 'production', mode: 'production',