Last active
April 8, 2018 02:01
-
-
Save zenorocha/53daffe28de983907579 to your computer and use it in GitHub Desktop.
Bundling Clipboard.js' distribution with Webpack
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 Clipboard = require('clipboard'); |
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
{ | |
"private": true, | |
"dependencies": { | |
"clipboard": "^1.5.1" | |
}, | |
"devDependencies": { | |
"webpack": "^1.12.1" | |
}, | |
"scripts": { | |
"build": "webpack" | |
} | |
} |
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
module.exports = { | |
entry: "./entry.js", | |
output: { | |
path: __dirname, | |
filename: "bundle.js" | |
}, | |
resolve: { | |
alias: { | |
clipboard: 'clipboard/dist/clipboard' | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment