1
0
mirror of synced 2025-01-31 14:51:41 +03:00

Improves minified browser build

This commit is contained in:
Justin Schroeder 2020-02-28 11:19:44 -05:00
parent 8576bd0b71
commit 50ff66f86f
9 changed files with 19 additions and 19 deletions

View File

@ -8,14 +8,14 @@ export default {
input: 'src/Formulate.js', // Path relative to package.json
output: {
name: 'Formulate',
exports: 'named'
// globals: {
// 'is-plain-object': 'isPlainObject',
// 'nanoid': 'nanoid',
// 'is-url': 'isUrl'
// }
exports: 'named',
globals: {
'is-plain-object': 'isPlainObject',
'nanoid/non-secure': 'nanoid',
'is-url': 'isUrl'
}
},
// external: ['is-plain-object', 'nanoid', 'is-url'],
external: ['nanoid/non-secure'],
plugins: [
commonjs(),
autoExternal(),

View File

@ -13,9 +13,8 @@ export default {
format: 'iife',
globals: {
'is-plain-object': 'isPlainObject',
'nanoid': 'nanoid',
'is-url': 'isUrl',
'crypto': 'crypto'
'nanoid/non-secure': 'nanoid',
'is-url': 'isUrl'
}
},
plugins: [
@ -24,7 +23,7 @@ export default {
preferBuiltins: false
}),
commonjs(),
internal(['is-plain-object', 'nanoid', 'is-url', 'crypto']),
internal(['is-plain-object', 'nanoid/non-secure', 'is-url']),
vue({
css: true, // Dynamically inject css as a <style> tag
compileTemplate: true // Explicitly convert template to render function

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import nanoid from 'nanoid'
import nanoid from 'nanoid/non-secure'
/**
* The file upload class holds and represents a files upload state durring

View File

@ -171,6 +171,7 @@ class Formulate {
}
export default new Formulate()
export {
FileUpload
}

View File

@ -56,7 +56,7 @@
<script>
import context from './libs/context'
import { shallowEqualObjects, parseRules } from './libs/utils'
import nanoid from 'nanoid'
import nanoid from 'nanoid/non-secure'
export default {
name: 'FormulateInput',

View File

@ -1,4 +1,4 @@
import nanoid from 'nanoid'
import nanoid from 'nanoid/non-secure'
import { map, arrayify } from './utils'
/**