Skip to content

Instantly share code, notes, and snippets.

@ujjwalguptaofficial
Created January 18, 2018 04:26
Show Gist options
  • Save ujjwalguptaofficial/d0289a52e1dc5175a157975b0c5fc1e5 to your computer and use it in GitHub Desktop.
Save ujjwalguptaofficial/d0289a52e1dc5175a157975b0c5fc1e5 to your computer and use it in GitHub Desktop.
webpack setup for jsstore
<!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>
import JsStore from 'JsStore';
var connection = new JsStore.Instance();
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