Last active
October 19, 2017 07:55
-
-
Save baranovxyz/eb900749b1b91c19c3d3d53b485bb975 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
module.exports = { | |
entry: { | |
main: [appPath("src", "index.ts"), appPath("src", "css", "styles.scss")] | |
}, | |
output: { | |
filename: "bundle.[hash].js", | |
path: appPath("build") | |
}, | |
devServer: { | |
historyApiFallback: { | |
index: "index.html", | |
rewrites: [ | |
// should redirect to bundle with js | |
/** | |
* How to reference bundle.[hash].js from output here? | |
*/ | |
{ from: /.*\/bundle.*/, to: "/bundle.[hash].js" }, | |
// should redirect other requests to index.html | |
{ from: /./, to: "/" } | |
] | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment