Skip to content

Instantly share code, notes, and snippets.

@kai-inokuchi
Created November 5, 2015 03:43
Show Gist options
  • Save kai-inokuchi/3f14dfe3a81d6e816446 to your computer and use it in GitHub Desktop.
Save kai-inokuchi/3f14dfe3a81d6e816446 to your computer and use it in GitHub Desktop.
webpack config for angular-localForage
BowerWebpackPlugin = require 'bower-webpack-plugin'
path = require 'path'
module.exports =
resolve:
root: [path.join(__dirname, 'bower_components')]
moduleDirectories: ['bower_components']
extensions: ['', '.js', '.webpack.js', '.web.js']
module:
loaders: [
{test: /angular\.js$/, loader: 'exports?angular' }
{test: /localforage\.js$/, loaders: ['exports?window.localforage', 'script'] }
{test: /angular-localForage\.js$/, loader: 'imports?this=>{angular: angular}' }
]
plugins: [
new BowerWebpackPlugin()
]
@juhamust
Copy link

Thanks for sharing this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment