set window target for minified build (#685)

* set `globalObject` option

* commit builded assets

* set window target for minified build
This commit is contained in:
Konstantin Vyatkin 2019-10-24 13:21:40 -04:00 committed by Josh Johnson
parent 472e0dff39
commit bef6743c3b
5 changed files with 12 additions and 1114 deletions

View File

@ -2,7 +2,7 @@
"name": "choices.js",
"version": "7.1.5",
"description": "A vanilla JS customisable text input/select box plugin",
"main": "./public/assets/scripts/choices.min.js",
"main": "./public/assets/scripts/choices.js",
"types": "./types/index.d.ts",
"scripts": {
"start": "run-p js:watch css:watch",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,9 @@ module.exports = {
entry: ['./src/scripts/choices'],
output: {
library: 'Choices',
libraryTarget: 'umd',
libraryTarget: 'window',
libraryExport: 'default',
globalObject: 'window',
},
module: {
rules: [

View File

@ -30,7 +30,7 @@ module.exports = [
deepMerge(
prodConfig,
{
output: { filename: 'choices.js' },
output: { filename: 'choices.js', libraryTarget: 'umd' },
optimization: { minimize: false },
},
{