1 Star 1 Fork 0

Luoooo/maplibre-gl-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.csp.ts 966 Bytes
一键复制 编辑 原始数据 按行查看 历史
Birk Skyum 提交于 2022-12-18 09:54 . Bump rollup from 2 to 3 (#1949)
import {plugins} from './build/rollup_plugins';
import banner from './build/banner';
import {InputOption, ModuleFormat, RollupOptions} from 'rollup';
// a config for generating a special GL JS bundle with static web worker code (in a separate file)
// https://github.com/mapbox/mapbox-gl-js/issues/6058
const {BUILD} = process.env;
const production: boolean = (BUILD !== 'dev');
const outputPostfix: string = production ? '' : '-dev';
const config = (input: InputOption, file: string, format: ModuleFormat): RollupOptions => ({
input,
output: {
name: 'maplibregl',
file,
format,
sourcemap: true,
indent: false,
banner
},
treeshake: production,
plugins: plugins(production)
});
const configs = [
config('src/index.ts', `dist/maplibre-gl-csp${outputPostfix}.js`, 'umd'),
config('src/source/worker.ts', `dist/maplibre-gl-csp-worker${outputPostfix}.js`, 'iife')
];
export default configs;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/luogeng_cn/maplibre-gl-js.git
git@gitee.com:luogeng_cn/maplibre-gl-js.git
luogeng_cn
maplibre-gl-js
maplibre-gl-js
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385