Created
July 8, 2018 20:17
-
-
Save arutnik/d01f90c46294c84c6c93c61357b306df to your computer and use it in GitHub Desktop.
SEO-SPA: Strip lib from Webpack
This file contains hidden or 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
plugins: [ | |
new webpack.NormalModuleReplacementPlugin(/jquery-funpicker/, // Adding this rule strips jquery-funpicker | |
path.join(__dirname, 'webpack/empty.json')), // out of the server bundle | |
new webpack.ContextReplacementPlugin( | |
// fixes WARNING Critical dependency: the request of a dependency is an expression | |
/(.+)?angular(\\|\/)core(.+)?/, | |
path.join(__dirname, 'src'), // location of your src | |
{} // a map of your routes | |
), | |
new webpack.ContextReplacementPlugin( | |
// fixes WARNING Critical dependency: the request of a dependency is an expression | |
/(.+)?express(\\|\/)(.+)?/, | |
path.join(__dirname, 'src'), | |
{} | |
) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment