Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
afdb42a2
Commit
afdb42a2
authored
4 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
merged webpack configs
parent
28506707
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
webpack/webpack.aot-common.js
+81
-0
81 additions, 0 deletions
webpack/webpack.aot-common.js
webpack/webpack.aot.js
+3
-87
3 additions, 87 deletions
webpack/webpack.aot.js
webpack/webpack.dev-aot.js
+2
-79
2 additions, 79 deletions
webpack/webpack.dev-aot.js
with
86 additions
and
166 deletions
webpack/webpack.aot-common.js
0 → 100644
+
81
−
0
View file @
afdb42a2
const
webpack
=
require
(
'
webpack
'
)
const
path
=
require
(
'
path
'
)
const
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
const
ngtools
=
require
(
'
@ngtools/webpack
'
)
const
AngularCompilerPlugin
=
ngtools
.
AngularCompilerPlugin
const
merge
=
require
(
'
webpack-merge
'
)
const
staticAssets
=
require
(
'
./webpack.staticassets
'
)
const
commonAot
=
{
entry
:
{
main
:
'
./src/main-aot.ts
'
},
output
:
{
filename
:
'
[name].js
'
,
path
:
path
.
resolve
(
__dirname
,
'
../dist/aot
'
)
},
module
:
{
rules
:
[
{
test
:
/third_party.*
?\.
js$|worker
\.
js|worker-
\w
+
\.
js/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
},
{
test
:
/
(?:\.
ngfactory
\.
js|
\.
ngstyle
\.
js|
\.
ts
)
$/
,
loader
:
'
@ngtools/webpack
'
,
exclude
:
/third_party|plugin_example|spec
\.
ts|test
\.
ts/
},
{
test
:
/
\.(
html|css
)
$/
,
exclude
:
/export
\_
nehuba|index|res
\/
css|plugin_example|material
\/
prebuilt-themes/
,
use
:
{
loader
:
'
raw-loader
'
,
}
},
{
test
:
/res
\/
css.*
?
css$/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
}
]
},
plugins
:
[
new
HtmlWebpackPlugin
({
template
:
'
src/index.html
'
}),
new
AngularCompilerPlugin
({
tsConfigPath
:
'
tsconfig-aot.json
'
,
entryModule
:
'
src/main.module#MainModule
'
,
directTemplateLoading
:
true
}),
new
webpack
.
DefinePlugin
({
// TODO have to figure out how to set this properly
// needed to avoid inline eval
// shouldn't mode: 'production' do that already?
ngDevMode
:
false
,
ngJitMode
:
false
})
],
resolve
:
{
extensions
:
[
'
.ts
'
,
'
.js
'
,
'
.json
'
],
alias
:
{
"
third_party
"
:
path
.
resolve
(
__dirname
,
'
../third_party
'
),
"
src
"
:
path
.
resolve
(
__dirname
,
'
../src
'
)
}
}
}
module
.
exports
=
merge
(
staticAssets
,
commonAot
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
webpack/webpack.aot.js
+
3
−
87
View file @
afdb42a2
const
common
=
require
(
'
./webpack.common.js
'
)
const
path
=
require
(
'
path
'
)
const
ngtools
=
require
(
'
@ngtools/webpack
'
)
const
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
const
AngularCompilerPlugin
=
ngtools
.
AngularCompilerPlugin
const
ClosureCompilerPlugin
=
require
(
'
webpack-closure-compiler
'
)
const
merge
=
require
(
'
webpack-merge
'
)
const
merge
=
require
(
'
webpack-merge
'
)
const
staticAssets
=
require
(
'
./webpack.staticassets
'
)
const
aotCommon
=
require
(
'
./webpack.aot-common
'
)
const
TerserPlugin
=
require
(
'
terser-webpack-plugin
'
)
const
webpack
=
require
(
'
webpack
'
)
module
.
exports
=
merge
(
staticAssets
,
{
module
.
exports
=
merge
(
aotCommon
,
{
mode
:
'
production
'
,
mode
:
'
production
'
,
entry
:
{
})
main
:
'
./src/main-aot.ts
'
},
output
:
{
filename
:
'
[name].js
'
,
path
:
path
.
resolve
(
__dirname
,
'
../dist/aot
'
)
},
module
:
{
rules
:
[
{
test
:
/third_party.*
?\.
js$|worker
\.
js|worker-
\w
+
\.
js/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
},
{
test
:
/
(?:\.
ngfactory
\.
js|
\.
ngstyle
\.
js|
\.
ts
)
$/
,
loader
:
'
@ngtools/webpack
'
,
exclude
:
/third_party|plugin_example|spec
\.
ts$/
},
{
test
:
/
\.(
html|css
)
$/
,
exclude
:
/export
\_
nehuba|index|res
\/
css|plugin_example|material
\/
prebuilt-themes/
,
use
:
{
loader
:
'
raw-loader
'
,
}
},
{
test
:
/res
\/
css.*
?
css$/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
}
]
},
plugins
:
[
new
HtmlWebpackPlugin
({
template
:
'
src/index.html
'
}),
new
AngularCompilerPlugin
({
tsConfigPath
:
'
tsconfig-aot.json
'
,
entryModule
:
'
src/main.module#MainModule
'
,
directTemplateLoading
:
true
}),
new
webpack
.
DefinePlugin
({
// TODO have to figure out how to set this properly
// needed to avoid inline eval
// shouldn't mode: 'production' do that already?
ngDevMode
:
false
,
ngJitMode
:
false
})
],
optimization
:
{
minimizer
:
[
new
TerserPlugin
({
extractComments
:
false
})
]
},
resolve
:
{
extensions
:
[
'
.ts
'
,
'
.js
'
,
'
.json
'
],
alias
:
{
"
third_party
"
:
path
.
resolve
(
__dirname
,
'
../third_party
'
),
"
src
"
:
path
.
resolve
(
__dirname
,
'
../src
'
)
}
}
})
\ No newline at end of file
This diff is collapsed.
Click to expand it.
webpack/webpack.dev-aot.js
+
2
−
79
View file @
afdb42a2
const
common
=
require
(
'
./webpack.common.js
'
)
const
path
=
require
(
'
path
'
)
const
ngtools
=
require
(
'
@ngtools/webpack
'
)
const
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
const
AngularCompilerPlugin
=
ngtools
.
AngularCompilerPlugin
const
ClosureCompilerPlugin
=
require
(
'
webpack-closure-compiler
'
)
const
merge
=
require
(
'
webpack-merge
'
)
const
merge
=
require
(
'
webpack-merge
'
)
const
staticAssets
=
require
(
'
./webpack.staticassets
'
)
const
aotCommon
=
require
(
'
./webpack.aot-common
'
)
const
TerserPlugin
=
require
(
'
terser-webpack-plugin
'
)
const
webpack
=
require
(
'
webpack
'
)
module
.
exports
=
merge
(
staticAssets
,
{
module
.
exports
=
merge
(
aotCommon
,
{
mode
:
'
development
'
,
mode
:
'
development
'
,
entry
:
{
main
:
'
./src/main-aot.ts
'
},
output
:
{
filename
:
'
[name].js
'
,
path
:
path
.
resolve
(
__dirname
,
'
../dist/aot
'
)
},
devtool
:
'
source-map
'
,
devtool
:
'
source-map
'
,
module
:
{
rules
:
[
{
test
:
/third_party.*
?\.
js$|worker
\.
js|worker-
\w
+
\.
js/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
},
{
test
:
/
(?:\.
ngfactory
\.
js|
\.
ngstyle
\.
js|
\.
ts
)
$/
,
loader
:
'
@ngtools/webpack
'
,
exclude
:
/third_party|plugin_example/
},
{
test
:
/
\.(
html|css
)
$/
,
exclude
:
/export
\_
nehuba|index|res
\/
css|plugin_example|material
\/
prebuilt-themes/
,
use
:
{
loader
:
'
raw-loader
'
,
}
},
{
test
:
/res
\/
css.*
?
css$/
,
use
:
{
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[ext]
'
}
}
}
]
},
plugins
:
[
new
HtmlWebpackPlugin
({
template
:
'
src/index.html
'
}),
new
AngularCompilerPlugin
({
tsConfigPath
:
'
tsconfig-aot.json
'
,
entryModule
:
'
src/main.module#MainModule
'
,
directTemplateLoading
:
true
}),
new
webpack
.
DefinePlugin
({
// TODO have to figure out how to set this properly
// needed to avoid inline eval
// shouldn't mode: 'production' do that already?
ngDevMode
:
false
,
ngJitMode
:
false
})
],
resolve
:
{
extensions
:
[
'
.ts
'
,
'
.js
'
,
'
.json
'
],
alias
:
{
"
third_party
"
:
path
.
resolve
(
__dirname
,
'
../third_party
'
),
"
src
"
:
path
.
resolve
(
__dirname
,
'
../src
'
)
}
}
})
})
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment