Skip to content

Instantly share code, notes, and snippets.

@calebporzio
Created March 2, 2019 15:17
Show Gist options
  • Save calebporzio/f29a62ca3d7715fa7c10894ae5d08b7d to your computer and use it in GitHub Desktop.
Save calebporzio/f29a62ca3d7715fa7c10894ae5d08b7d to your computer and use it in GitHub Desktop.
A webpack.mix.js file for writing NPM packages the way you write JS in a Laravel app.
let mix = require('laravel-mix');
mix.js('src/index.js', 'dist/foo.js').sourceMaps();
mix.webpackConfig({
output: {
libraryTarget: 'umd',
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment