Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Agiliza
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evologica
Agiliza
Commits
215a01cb
Commit
215a01cb
authored
Sep 08, 2021
by
Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrige caminho dos apps no webpack
parent
68f2e754
Pipeline
#7956
passed with stage
in 2 minutes and 11 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
webpack.config.js
cli/web/agente/webpack.config.js
+1
-1
server.js
cli/web/cliente/server.js
+8
-4
webpack.config.js
cli/web/cliente/webpack.config.js
+2
-2
No files found.
cli/web/agente/webpack.config.js
View file @
215a01cb
...
...
@@ -144,7 +144,7 @@ const output = (env) => ({
chunkFilename
:
env
.
production
?
'js/chunks/[name].[chunkhash].js'
:
'js/chunks/[name].js'
,
filename
:
env
.
production
?
'js/[name].[contenthash].js'
:
'js/[name].js'
,
path
:
DIST
,
publicPath
:
'
/
'
,
publicPath
:
''
,
})
const
devServer
=
(
env
)
=>
({
...
...
cli/web/cliente/server.js
View file @
215a01cb
...
...
@@ -2,12 +2,16 @@ const express = require('express')
const
path
=
require
(
'path'
)
const
server
=
express
()
server
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'dist'
)))
const
channel
=
process
.
argv
[
2
]
const
port
=
process
.
argv
[
3
]
||
3000
const
distPath
=
channel
?
`dist/
${
channel
}
`
:
'dist'
server
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
distPath
)))
server
.
get
(
'*'
,
(
req
,
res
)
=>
{
res
.
sendFile
(
path
.
join
(
__dirname
,
'dist'
,
'index.html'
))
res
.
sendFile
(
path
.
join
(
__dirname
,
distPath
,
'index.html'
))
})
server
.
listen
(
3001
,
()
=>
{
console
.
log
(
'Listening at http://localhost:3001/'
)
server
.
listen
(
Number
(
port
)
,
()
=>
{
console
.
log
(
`Listening at http://localhost:
${
port
}
/`
)
})
cli/web/cliente/webpack.config.js
View file @
215a01cb
...
...
@@ -146,7 +146,7 @@ const output = (env) => ({
chunkFilename
:
env
.
production
?
'js/chunks/[name].[chunkhash].js'
:
'js/chunks/[name].js'
,
filename
:
env
.
production
?
'js/[name].[contenthash].js'
:
'js/[name].js'
,
path
:
DIST
,
publicPath
:
'
/
'
,
publicPath
:
''
,
})
const
devServer
=
(
env
)
=>
({
...
...
@@ -172,7 +172,7 @@ module.exports = (env) => {
return
{
context
:
SRC
,
mode
:
env
.
production
?
'production'
:
'development'
,
entry
:
[
'./index.tsx'
]
,
entry
:
'./index.tsx'
,
devtool
:
env
.
production
?
undefined
:
'eval-cheap-module-source-map'
,
devServer
:
devServer
(
env
),
module
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment