Skip to content

Instantly share code, notes, and snippets.

@Retsam

Retsam/a.js Secret

Created September 18, 2017 14:49
Show Gist options
  • Save Retsam/9c35799c3b1867d9a1170f8c04301308 to your computer and use it in GitHub Desktop.
Save Retsam/9c35799c3b1867d9a1170f8c04301308 to your computer and use it in GitHub Desktop.
Webpack circular dependency
import b from "./b";
export default "a";
import c from "./c";
export default "b";
import a from "./a";
export default "c";
const path = require("path");
const webpack = require("webpack");
const CircularDependencyPlugin = require("circular-dependency-plugin");
module.exports = {
entry: "./a",
output: {
filename: "bundle.js",
path: path.resolve("dist")
},
plugins: [
new CircularDependencyPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment