laravel mix build as umd code example
Example: laravel mix build as umd
mix.js('src/main.js', 'dist/libraryName.js')
mix.webpackConfig({
output: {
library: 'libraryName',
libraryTarget: 'umd',
umdNamedDefine: true
}
})
mix.js('src/main.js', 'dist/libraryName.js')
mix.webpackConfig({
output: {
library: 'libraryName',
libraryTarget: 'umd',
umdNamedDefine: true
}
})