Browse Source

set window target for minified build (#685)

* set `globalObject` option

* commit builded assets

* set window target for minified build
pull/694/head
Konstantin Vyatkin 2 years ago
committed by Josh Johnson
parent
commit
bef6743c3b
  1. 2
      package.json
  2. 1073
      public/assets/scripts/choices.js
  3. 46
      public/assets/scripts/choices.min.js
  4. 3
      webpack.config.base.js
  5. 2
      webpack.config.prod.js

2
package.json

@ -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",

1073
public/assets/scripts/choices.js

File diff suppressed because one or more lines are too long

46
public/assets/scripts/choices.min.js

File diff suppressed because one or more lines are too long

3
webpack.config.base.js

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

2
webpack.config.prod.js

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

Loading…
Cancel
Save