Support a script tag only for the full build

This commit is contained in:
Tim Schaub
2022-08-29 12:17:10 -06:00
parent 1614a27ee1
commit 8a9bf4ac7a
3 changed files with 3 additions and 40 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export default {
name: 'ol',
format: 'umd',
exports: 'default',
file: 'build/full/ol.cjs',
file: 'build/full/ol.js',
globals: {
geotiff: 'geotiff',
},
-37
View File
@@ -1,37 +0,0 @@
import TerserPlugin from 'terser-webpack-plugin';
import path from 'path';
export default {
entry: './build/index.js',
devtool: 'source-map',
mode: 'production',
target: ['browserslist'],
resolve: {
fallback: {
fs: false,
http: false,
https: false,
},
alias: {
ol: path.resolve('./build/ol'),
},
},
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
// Mangle private members convention with underscore suffix
mangle: {properties: {regex: /_$/}},
},
}),
],
},
output: {
path: path.resolve('./build/legacy'),
publicPath: 'auto',
filename: 'ol.js',
library: 'ol',
libraryTarget: 'umd',
libraryExport: 'default',
},
};