Last active
August 29, 2015 14:19
-
-
Save adam-beck/8308d6035cbf5f510257 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as foundation from '../bower_components/foundation/js/foundation.js'; | |
document.foundation(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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