-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(javascriptservices): update for .net core 2.0
The webpack build was broken with .net core 2.0 The SpaServices middleware is incompatible with the cli webpack config This adds a config file for webpack that fixes it and was added to the new project build. Realtes to issues #734 and #701, clean-webpack-plugin needs to be installed otherwise webpack gets stuck in a rebuilding loop see webpack/watchpack#25 and referenced issues
- Loading branch information
Showing
5 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
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
16 changes: 16 additions & 0 deletions
16
lib/resources/content/javascriptservices/webpack.netcore.config.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const webpackConfig = require('./webpack.config'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const CleanWebpackPlugin = require('clean-webpack-plugin'); | ||
var originalConfig = webpackConfig({}); | ||
|
||
module.exports = () => { | ||
let config = { ...originalConfig }; | ||
config.output.filename = '[name].bundle.js'; | ||
config.output.publicPath = '/dist/'; | ||
config.plugins.splice(config.plugins.indexOf(HtmlWebpackPlugin)); | ||
config.plugins = [ | ||
new CleanWebpackPlugin([config.output.path]), | ||
...config.plugins | ||
]; | ||
return config; | ||
}; |