Skip to content

Commit 7ad094f

Browse files
authored
Merge pull request #7 from cortex-command-community/development
fix: resolve webpack build issues, start server correctly
2 parents 367f17a + c91da98 commit 7ad094f

File tree

9 files changed

+45
-13
lines changed

9 files changed

+45
-13
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ jobs:
3636

3737
- name: 'Semantic Release'
3838
run: npx semantic-release
39+
40+
- name: Update dev branch.
41+
run: |
42+
git fetch --unshallow
43+
git checkout development
44+
git pull
45+
git merge main
46+
git push

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/client/project.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"main": "packages/client/src/extension.ts",
1616
"tsConfig": "packages/client/tsconfig.app.json",
1717
"webpackConfig": "packages/client/webpack.config.js",
18-
"target": "node",
19-
"outputFileName": "extension.js"
18+
"target": "node"
2019
},
2120
"configurations": {
2221
"production": {}

packages/client/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616

1717
export function activate(context: ExtensionContext): void {
1818
const serverModule = context.asAbsolutePath(
19-
path.join('dist', 'packages', 'server', 'src', 'sampleServer.js')
19+
path.join('dist', 'packages', 'server', 'src', 'extension.js')
2020
);
2121
const serverOptions: ServerOptions = {
2222
run: {

packages/client/webpack.config.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = composePlugins(withNx(), withWeb(), (config) => {
2020
configFile: path.join(__dirname, 'tsconfig.app.json'),
2121
}),
2222
],
23-
mainFields: ['module', 'main'],
23+
mainFields: ['module', 'browser', 'main'],
2424
extensions: ['.ts', '.js'], // support ts-files and js-files
2525
};
2626

@@ -48,7 +48,17 @@ module.exports = composePlugins(withNx(), withWeb(), (config) => {
4848
vscode: 'commonjs vscode', // ignored because it doesn't exist
4949
};
5050

51-
config.output.libraryTarget = 'commonjs';
51+
config.output.libraryTarget = 'commonjs2';
52+
// config.output.filename = 'extension.js';
53+
54+
config.output.publicPath = path.join(
55+
__dirname,
56+
'dist',
57+
'packages',
58+
'client',
59+
'src',
60+
'extension.js'
61+
);
5262

5363
// yes, really source maps
5464
config.devtool = 'source-map';

packages/server/project.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
"options": {
1313
"outputPath": "dist/packages/server/src",
1414
"compiler": "babel",
15-
"main": "packages/server/src/sampleServer.ts",
15+
"main": "packages/server/src/extension.ts",
1616
"tsConfig": "packages/server/tsconfig.app.json",
1717
"webpackConfig": "packages/server/webpack.config.js",
18-
"target": "node",
19-
"outputFileName": "server.js"
18+
"target": "node"
2019
},
2120
"configurations": {
2221
"production": {}
@@ -27,7 +26,7 @@
2726
"outputs": ["{options.outputPath}"],
2827
"options": {
2928
"outputPath": "dist/packages/server",
30-
"main": "packages/server/src/sampleServer.ts",
29+
"main": "packages/server/src/extension.ts",
3130
"tsConfig": "packages/server/tsconfig.app.json"
3231
}
3332
},

packages/server/webpack.config.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,24 @@ module.exports = composePlugins(withNx(), withWeb(), (config) => {
4747
vscode: 'commonjs vscode', // ignored because it doesn't exist
4848
};
4949

50-
config.output.libraryTarget = 'commonjs';
50+
config.output.libraryTarget = 'commonjs2';
51+
// config.output.filename = 'extension.js';
52+
53+
config.output.publicPath = path.join(
54+
__dirname,
55+
'dist',
56+
'packages',
57+
'server',
58+
'src',
59+
'extension.js'
60+
);
5161

5262
// yes, really source maps
5363
config.devtool = 'source-map';
5464

5565
config.context = path.join(__dirname);
5666
config.entry = {
57-
extension: './src/sampleServer.ts',
67+
extension: './src/extension.ts',
5868
};
5969

6070
return config;

tests/Index.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ DataModule
1010
Test = ContentFile
1111

1212
FilePath = test
13+
1314
Test = Color
15+
aadad
16+
StartOffset
17+
18+
19+
s
1420
R = 4
1521
G = -2
1622
B = 3

0 commit comments

Comments
 (0)