Skip to content

Instantly share code, notes, and snippets.

@adam-beck
Last active August 29, 2015 14:19
Show Gist options
  • Save adam-beck/8308d6035cbf5f510257 to your computer and use it in GitHub Desktop.
Save adam-beck/8308d6035cbf5f510257 to your computer and use it in GitHub Desktop.
import * as foundation from '../bower_components/foundation/js/foundation.js';
document.foundation();
ERROR in ./bower_components/foundation/js/foundation.js
Module not found: Error: Cannot resolve module 'bower_components/jquery/dist/jquery.js' in /home/dev/repos/example/bower_components/foundation/js
@ ./bower_components/foundation/js/foundation.js 1:0-17
var webpack = require('webpack');
module.exports = {
entry: './src/app.js',
output: {
path: __dirname + '/.tmp',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /bower_components/, loader: 'babel-loader'}
]
},
resolve: {
alias: {
jquery: 'bower_components/jquery/dist/jquery.js'
}
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment