aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/config/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/config/webpack.config.js')
-rw-r--r--server/sonar-web/config/webpack.config.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/server/sonar-web/config/webpack.config.js b/server/sonar-web/config/webpack.config.js
index cc2bfe7e970..c5439551c5c 100644
--- a/server/sonar-web/config/webpack.config.js
+++ b/server/sonar-web/config/webpack.config.js
@@ -36,7 +36,7 @@ module.exports = ({ production = true }) => ({
extensions: ['.ts', '.tsx', '.js', '.json'],
// import from 'Docs/foo.md' is rewritten to import from 'sonar-docs/src/foo.md'
alias: {
- Docs: path.resolve(__dirname, '../../sonar-docs/src/tooltips')
+ Docs: path.resolve(__dirname, '../../sonar-docs/src')
}
},
entry: [
@@ -79,7 +79,11 @@ module.exports = ({ production = true }) => ({
},
{ test: require.resolve('lodash'), loader: 'expose-loader?_' },
{ test: require.resolve('react'), loader: 'expose-loader?React' },
- { test: require.resolve('react-dom'), loader: 'expose-loader?ReactDOM' }
+ { test: require.resolve('react-dom'), loader: 'expose-loader?ReactDOM' },
+ {
+ test: /\.directory-loader\.js$/,
+ loader: path.resolve(__dirname, 'documentation-loader/index.js')
+ }
].filter(Boolean)
},
plugins: [
@@ -89,6 +93,14 @@ module.exports = ({ production = true }) => ({
production &&
new CopyWebpackPlugin([
{
+ from: paths.docImages,
+ to: paths.appBuild + '/images/embed-doc/images'
+ }
+ ]),
+
+ production &&
+ new CopyWebpackPlugin([
+ {
from: paths.appPublic,
to: paths.appBuild,
ignore: [paths.appHtml]