-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove grunt-rollup grunt plugin, replace with customRollup task,
config done via external rollup.config.js. Remove uglify grunt plugin, replace with terser rollup plugin (does a better job with source maps and chained minification) Add nrcan-basemap grunt task for sibling project to get nrcan vector tile basemap working with pmtiles. # Conflicts: # Gruntfile.js
- Loading branch information
1 parent
72c23f5
commit 93326c0
Showing
3 changed files
with
64 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const nodeResolve = require('@rollup/plugin-node-resolve'); | ||
const alias = require('@rollup/plugin-alias'); | ||
const loadLocalePlugin = require('./load-locales.js'); | ||
const terser = require('@rollup/plugin-terser'); | ||
|
||
module.exports = { | ||
input: 'src/mapml/index.js', | ||
plugins: [ | ||
nodeResolve(), | ||
loadLocalePlugin(), | ||
alias({ | ||
entries: [ | ||
{ | ||
find: 'leaflet', | ||
replacement: 'leaflet/dist/leaflet-src.esm.js' | ||
} | ||
] | ||
}), | ||
terser({ | ||
compress: true, | ||
mangle: true, | ||
format: { | ||
comments: false | ||
}, | ||
sourceMap: true // Maintain source maps even during minification | ||
}) | ||
], | ||
output: { | ||
file: 'dist/mapml.js', | ||
format: 'esm', | ||
sourcemap: true | ||
} | ||
}; |