Skip to content

Commit 69d49f9

Browse files
committed
Fix indentation of webpack config
1 parent 6ce5043 commit 69d49f9

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

webpack.config.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ module.exports = (env, argv) => {
1717
return {
1818
entry: {
1919
"bundle": "./src/vector/index.js",
20-
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
21-
"mobileguide": "./src/vector/mobile_guide/index.js",
20+
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
21+
"mobileguide": "./src/vector/mobile_guide/index.js",
2222

23-
// CSS themes
24-
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
25-
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss",
26-
"theme-light-custom": "./node_modules/matrix-react-sdk/res/themes/light-custom/css/light-custom.scss",
27-
"theme-dark-custom": "./node_modules/matrix-react-sdk/res/themes/dark-custom/css/dark-custom.scss",
23+
// CSS themes
24+
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
25+
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss",
26+
"theme-light-custom": "./node_modules/matrix-react-sdk/res/themes/light-custom/css/light-custom.scss",
27+
"theme-dark-custom": "./node_modules/matrix-react-sdk/res/themes/dark-custom/css/dark-custom.scss",
2828
},
2929

3030
optimization: {
@@ -35,8 +35,8 @@ module.exports = (env, argv) => {
3535
cacheGroups: {
3636
styles: {
3737
name: 'styles',
38-
test: /\.css$/,
39-
enforce: true,
38+
test: /\.css$/,
39+
enforce: true,
4040
// Do not add `chunks: 'all'` here because you'll break the app entry point.
4141
},
4242
},
@@ -45,7 +45,7 @@ module.exports = (env, argv) => {
4545
// Minification is normally enabled by default for webpack in production mode, but
4646
// we use a CSS optimizer too and need to manage it ourselves.
4747
minimize: argv.mode === 'production',
48-
minimizer: argv.mode === 'production' ? [new TerserPlugin({}), new OptimizeCSSAssetsPlugin({})] : [],
48+
minimizer: argv.mode === 'production' ? [new TerserPlugin({}), new OptimizeCSSAssetsPlugin({})] : [],
4949
},
5050

5151
resolve: {
@@ -59,22 +59,22 @@ module.exports = (env, argv) => {
5959
// layer to have our custom alternate fields to load things in the right order. These are
6060
// the defaults of webpack prepended with `matrix_src_`.
6161
mainFields: ['matrix_src_browser', 'matrix_src_main', 'browser', 'main'],
62-
aliasFields: ['matrix_src_browser', 'browser'],
62+
aliasFields: ['matrix_src_browser', 'browser'],
6363

64-
// We need to specify that TS can be resolved without an extension
65-
extensions: ['.js', '.json', '.ts'],
66-
alias: {
64+
// We need to specify that TS can be resolved without an extension
65+
extensions: ['.js', '.json', '.ts'],
66+
alias: {
6767
// alias any requires to the react module to the one in our path,
6868
// otherwise we tend to get the react source included twice when
6969
// using `npm link` / `yarn link`.
7070
"react": path.resolve(__dirname, 'node_modules/react'),
71-
"react-dom": path.resolve(__dirname, 'node_modules/react-dom'),
71+
"react-dom": path.resolve(__dirname, 'node_modules/react-dom'),
7272

73-
// same goes for js-sdk - we don't need two copies.
74-
"matrix-js-sdk": path.resolve(__dirname, 'node_modules/matrix-js-sdk'),
73+
// same goes for js-sdk - we don't need two copies.
74+
"matrix-js-sdk": path.resolve(__dirname, 'node_modules/matrix-js-sdk'),
7575

76-
// Define a variable so the i18n stuff can load
77-
"$webapp": path.resolve(__dirname, 'webapp'),
76+
// Define a variable so the i18n stuff can load
77+
"$webapp": path.resolve(__dirname, 'webapp'),
7878
},
7979
},
8080

@@ -99,7 +99,7 @@ module.exports = (env, argv) => {
9999
exclude: /node_modules/,
100100
loader: 'babel-loader',
101101
options: {
102-
cacheDirectory: true,
102+
cacheDirectory: true
103103
}
104104
},
105105
{
@@ -283,8 +283,8 @@ module.exports = (env, argv) => {
283283
}),
284284
],
285285

286-
output: {
287-
path: path.join(__dirname, "webapp"),
286+
output: {
287+
path: path.join(__dirname, "webapp"),
288288

289289
// The generated JS (and CSS, from the extraction plugin) are put in a
290290
// unique subdirectory for the build. There will only be one such
@@ -295,7 +295,7 @@ module.exports = (env, argv) => {
295295
// chunks even after the app is redeployed.
296296
filename: "bundles/[hash]/[name].js",
297297
chunkFilename: "bundles/[hash]/[name].js",
298-
},
298+
},
299299

300300
// DO NOT enable this option. It makes the source maps all wonky. Instead,
301301
// we end up including the sourcemaps through the loaders which makes them
@@ -307,7 +307,7 @@ module.exports = (env, argv) => {
307307
// serve unwebpacked assets from webapp.
308308
contentBase: './webapp',
309309

310-
stats: {
310+
stats: {
311311
// don't fill the console up with a mahoosive list of modules
312312
chunks: false,
313313
},
@@ -316,7 +316,7 @@ module.exports = (env, argv) => {
316316
// so webpack-dev-server reloads the page on every update which is quite
317317
// tedious in Riot since that can take a while.
318318
hot: false,
319-
inline: false,
319+
inline: false,
320320
},
321321
};
322322
};

0 commit comments

Comments
 (0)