1
0
mirror of synced 2025-01-31 23:01:39 +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 input: 'src/Formulate.js', // Path relative to package.json
output: { output: {
name: 'Formulate', name: 'Formulate',
exports: 'named' exports: 'named',
// globals: { globals: {
// 'is-plain-object': 'isPlainObject', 'is-plain-object': 'isPlainObject',
// 'nanoid': 'nanoid', 'nanoid/non-secure': 'nanoid',
// 'is-url': 'isUrl' 'is-url': 'isUrl'
// } }
}, },
// external: ['is-plain-object', 'nanoid', 'is-url'], external: ['nanoid/non-secure'],
plugins: [ plugins: [
commonjs(), commonjs(),
autoExternal(), autoExternal(),

View File

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

View File

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

View File

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