Skip to content

Commit

Permalink
Config finalized.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Jun 1, 2018
1 parent c177b1d commit 8db577d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17,225 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -21,8 +21,9 @@ node_modules/
# Scripts (should be copied from node_modules on build)
**/wwwroot/scripts/**/*.*

/src/Squidex/Assets

/src/Squidex/appsettings.Development.json
/src/Squidex/Assets
/src/Squidex/package-lock.json
/src/Squidex/Properties/launchSettings.json

/global.json
7 changes: 5 additions & 2 deletions src/Squidex/app-config/webpack.run.base.js
Expand Up @@ -25,11 +25,14 @@ module.exports = webpackMerge(commonConfig, {
* See: https://github.com/ampedandwired/html-webpack-plugin
*/
new HtmlWebpackPlugin({
template: 'wwwroot/index.html', hash: true
hash: true,
chunks: ['shims', 'app'],
chunksSortMode: 'manual',
template: 'wwwroot/index.html'
}),

new HtmlWebpackPlugin({
template: 'wwwroot/theme.html', hash: true, filename: 'theme.html'
template: 'wwwroot/theme.html', hash: true, chunksSortMode: 'none', filename: 'theme.html'
})
]
});
10 changes: 10 additions & 0 deletions src/Squidex/app-config/webpack.run.prod.js
Expand Up @@ -5,6 +5,8 @@ MiniCssExtractPlugin = require('mini-css-extract-plugin'),
runConfig = require('./webpack.run.base.js'),
helpers = require('./helpers');

var CircularDependencyPlugin = require('circular-dependency-plugin');

helpers.removeLoaders(runConfig, ['scss', 'ts']);

module.exports = webpackMerge(runConfig, {
Expand Down Expand Up @@ -96,5 +98,13 @@ module.exports = webpackMerge(runConfig, {
tsConfigPath: './tsconfig.json',
entryModule: 'app/app.module#AppModule'
}),

new CircularDependencyPlugin({
onDetected({ module: webpackModuleRecord, paths, compilation }) {
// `paths` will be an Array of the relative module paths that make up the cycle
// `module` will be the module record generated by webpack that caused the cycle
console.log(paths.join(' -> '))
}
})
]
});

0 comments on commit 8db577d

Please sign in to comment.