Skip to content

Instantly share code, notes, and snippets.

@niladam
Forked from calebporzio/webpack.mix.js
Created March 2, 2019 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niladam/a606e50adfc5c4699aac5eeb7d30f852 to your computer and use it in GitHub Desktop.
Save niladam/a606e50adfc5c4699aac5eeb7d30f852 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