Created
January 18, 2018 04:26
-
-
Save ujjwalguptaofficial/d0289a52e1dc5175a157975b0c5fc1e5 to your computer and use it in GitHub Desktop.
webpack setup for jsstore
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Getting Started with Webpack</title> | |
<!-- do not use the npm package, use it from local otherwise jsstore wont be executed in web worker. --> | |
<script src="https://cdn.jsdelivr.net/npm/jsstore@1.4.3"></script> | |
<script src="bundle.js"></script> | |
</head> | |
<body> | |
<h1>WebPack is fun</h1> | |
</body> | |
</html> |
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 JsStore from 'JsStore'; | |
var connection = new JsStore.Instance(); |
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: './main.js', | |
output: { | |
filename: './bundle.js' | |
}, | |
watch: true, | |
externals: { | |
JsStore: 'JsStore' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment