Skip to content

Commit

Permalink
Fix eslint loading failure: #35.
Browse files Browse the repository at this point in the history
  • Loading branch information
zddai committed Dec 29, 2020
1 parent c8d76e2 commit 589af16
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
out
node_modules
.cache/
.parcel-cache/
node_modules/
.vscode-test/
*.vsix
.DS_Store
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"version": "5.0.6",
"license": "MIT",
"scripts": {
"vscode:prepublish": "npm run clean && npm run compile",
"vscode:prepublish": "npm run webpack-prod",
"webpack": "npm run clean && webpack --mode development",
"webpack-prod": "npm run clean && webpack --mode production",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
Expand Down
15 changes: 3 additions & 12 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const config: Configuration = {
path: path.resolve(__dirname, 'out'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]',
},
externals: {
eslint: 'eslint',
vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
},
resolve: {
Expand All @@ -23,17 +23,8 @@ const config: Configuration = {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/, /\.test\.ts$/, /\\test\\/],
use: [
{
loader: 'ts-loader',
options: {
compilerOptions: {
module: 'es6', // override `tsconfig.json` so that TypeScript emits native JavaScript modules.
},
},
},
],
exclude: [/node_modules/],
use: 'ts-loader',
},
],
},
Expand Down

0 comments on commit 589af16

Please sign in to comment.