Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Culture
culture-views
Commits
81dab8c41525
Commit
02210e84
authored
Sep 11, 2020
by
Fabien Amarger
Browse files
feat: [webpack] Add the webpack config to handle the marker png and leaflet css
parent
2210cdc5fa14
Pipeline
#13918
failed with stages
in 3 minutes and 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
webpack.config.js
View file @
81dab8c4
const
path
=
require
(
'
path
'
);
const
CopyWebpackPlugin
=
require
(
'
copy-webpack-plugin
'
);
const
isProd
=
process
.
env
.
NODE_ENV
===
'
production
'
;
module
.
exports
=
{
...
...
@@ -26,10 +27,10 @@ module.exports = {
options
:
{
appendTsSuffixTo
:
[
/
\.
vue$/
]
},
},
{
test
:
/
\.(
ttf|eot|svg|woff
(
2
)?)(\?[
a-z0-9=&.
]
+
)?
$/
,
test
:
/
\.(
ttf|eot|svg|woff
(
2
)?
|png|jpe
?
g|gif
)(\?[
a-z0-9=&.
]
+
)?
$/
,
loader
:
'
file-loader
'
,
},
{
test
:
/
\.
css$/
,
loader
:
'
css-loader
'
},
{
test
:
/
\.
css$/
,
loader
:
[
'
style-loader
'
,
'
css-loader
'
]
},
{
enforce
:
'
pre
'
,
test
:
/
\.
js$/
,
loader
:
'
source-map-loader
'
},
],
},
...
...
webpack.dev.js
View file @
81dab8c4
...
...
@@ -17,6 +17,7 @@ module.exports = merge(common, {
transform
:
(
content
)
=>
content
.
toString
().
split
(
'
{DOMAIN}
'
).
join
(
DOMAIN
),
// replace all
},
{
from
:
'
node_modules/@logilab/libview/build/index.html
'
,
to
:
'
index.html
'
},
{
from
:
'
node_modules/leaflet/dist/images/*
'
,
to
:
'
images/
'
,
flatten
:
true
},
],
}),
new
webpack
.
DefinePlugin
({
...
...
webpack.prod.js
View file @
81dab8c4
...
...
@@ -17,6 +17,7 @@ module.exports = merge(common, {
transform
:
(
content
)
=>
content
.
toString
().
split
(
'
{DOMAIN}
'
).
join
(
DOMAIN
),
// replace all
},
{
from
:
'
node_modules/@logilab/libview/build/index.html
'
,
to
:
'
index.html
'
},
{
from
:
'
node_modules/leaflet/dist/images/*
'
,
to
:
'
images/
'
,
flatten
:
true
},
],
}),
new
webpack
.
DefinePlugin
({
...
...
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