增加.node文件loader
This commit is contained in:
parent
827476cfca
commit
f3711e61ca
|
@ -10,7 +10,7 @@ const path = require('path');
|
||||||
/** @type WebpackConfig */
|
/** @type WebpackConfig */
|
||||||
const extensionConfig = {
|
const extensionConfig = {
|
||||||
target: 'node', // VS Code extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
target: 'node', // VS Code extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
||||||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
||||||
|
|
||||||
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
|
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
|
||||||
output: {
|
output: {
|
||||||
|
@ -37,6 +37,12 @@ const extensionConfig = {
|
||||||
loader: 'ts-loader'
|
loader: 'ts-loader'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.node$/,
|
||||||
|
use: [
|
||||||
|
{ loader: 'node-loader' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -45,4 +51,4 @@ const extensionConfig = {
|
||||||
level: "log", // enables logging required for problem matchers
|
level: "log", // enables logging required for problem matchers
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module.exports = [ extensionConfig ];
|
module.exports = [extensionConfig];
|
Loading…
Reference in New Issue