Skip to content

Commit 6d7d0ca

Browse files
authored
Merge pull request #1477 from github/koesie10/unified-webpack-bundle
Unify the Webpack bundle
2 parents 6612c27 + de6c523 commit 6d7d0ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+389
-221
lines changed

extensions/ql-vscode/gulpfile.ts/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as gulp from 'gulp';
2-
import { compileTypeScript, watchTypeScript, copyViewCss, cleanOutput, watchCss } from './typescript';
2+
import { compileTypeScript, watchTypeScript, cleanOutput } from './typescript';
33
import { compileTextMateGrammar } from './textmate';
44
import { copyTestData } from './tests';
55
import { compileView, watchView } from './webpack';
@@ -10,7 +10,7 @@ export const buildWithoutPackage =
1010
gulp.series(
1111
cleanOutput,
1212
gulp.parallel(
13-
compileTypeScript, compileTextMateGrammar, compileView, copyTestData, copyViewCss
13+
compileTypeScript, compileTextMateGrammar, compileView, copyTestData
1414
)
1515
);
1616

@@ -23,6 +23,5 @@ export {
2323
copyTestData,
2424
injectAppInsightsKey,
2525
compileView,
26-
watchCss
2726
};
2827
export default gulp.series(buildWithoutPackage, injectAppInsightsKey, packageExtension);

extensions/ql-vscode/gulpfile.ts/typescript.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,3 @@ export function compileTypeScript() {
3939
export function watchTypeScript() {
4040
gulp.watch('src/**/*.ts', compileTypeScript);
4141
}
42-
43-
export function watchCss() {
44-
gulp.watch('src/**/*.css', copyViewCss);
45-
}
46-
47-
/** Copy CSS files for the results view into the output directory. */
48-
export function copyViewCss() {
49-
return gulp.src('src/**/view/*.css')
50-
.pipe(gulp.dest('out'));
51-
}

extensions/ql-vscode/gulpfile.ts/webpack.config.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import * as path from 'path';
22
import * as webpack from 'webpack';
3+
import * as MiniCssExtractPlugin from 'mini-css-extract-plugin';
34

45
export const config: webpack.Configuration = {
56
mode: 'development',
67
entry: {
7-
resultsView: './src/view/results.tsx',
8-
compareView: './src/compare/view/Compare.tsx',
9-
remoteQueriesView: './src/remote-queries/view/RemoteQueries.tsx',
8+
webview: './src/view/webview.tsx'
109
},
1110
output: {
1211
path: path.resolve(__dirname, '..', 'out'),
@@ -31,9 +30,7 @@ export const config: webpack.Configuration = {
3130
{
3231
test: /\.less$/,
3332
use: [
34-
{
35-
loader: 'style-loader'
36-
},
33+
MiniCssExtractPlugin.loader,
3734
{
3835
loader: 'css-loader',
3936
options: {
@@ -53,9 +50,7 @@ export const config: webpack.Configuration = {
5350
{
5451
test: /\.css$/,
5552
use: [
56-
{
57-
loader: 'style-loader'
58-
},
53+
MiniCssExtractPlugin.loader,
5954
{
6055
loader: 'css-loader'
6156
}
@@ -65,5 +60,6 @@ export const config: webpack.Configuration = {
6560
},
6661
performance: {
6762
hints: false
68-
}
63+
},
64+
plugins: [new MiniCssExtractPlugin()],
6965
};

0 commit comments

Comments
 (0)