-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: Use webpack to bundle extension
- Loading branch information
Showing
19 changed files
with
5,423 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
node_modules | ||
out | ||
dist | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-js-profile-flame"] | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-js-profile-flame", "amodio.tsl-problem-matcher"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
.github/** | ||
.vscode/** | ||
.vscode-test/** | ||
examples/** | ||
src | ||
out | ||
node_modules | ||
out/test/** | ||
out/**/*.map | ||
**/*.ts | ||
**/*.map | ||
|
||
# Specific root files | ||
.editorconfig | ||
.eslintric.json | ||
.gitattributes | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
Contributing.md | ||
package-lock.json | ||
tsconfig.json | ||
vsc-extension-quickstart.md | ||
tslint.json | ||
!renpy.json | ||
!renpyauto.json | ||
browser.webpack.config.ts | ||
webpack.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import NodePolyfillPlugin from "node-polyfill-webpack-plugin"; | ||
import { Configuration, DefinePlugin } from "webpack"; | ||
import { basePlugins, baseConfig } from "./webpack.config"; | ||
|
||
export const browserConfig: Configuration = { | ||
target: "webworker", // extensions run in a webworker context | ||
resolve: { | ||
mainFields: ["browser", "module", "main"], | ||
extensions: [".ts", ".js"], // support ts-files and js-files | ||
}, | ||
performance: { | ||
hints: false, | ||
}, | ||
plugins: [ | ||
new NodePolyfillPlugin(), | ||
new DefinePlugin({ | ||
"process.platform": JSON.stringify("web"), | ||
"process.env": JSON.stringify({}), | ||
"process.env.BROWSER_ENV": JSON.stringify("true"), | ||
}), | ||
...basePlugins, | ||
], | ||
...baseConfig, | ||
}; | ||
|
||
export default browserConfig; |
Oops, something went wrong.