代码拉取完成,页面将自动刷新
const webpack = require('webpack');
const path = require('path');
module.exports = function (env, argv) {
env = env || {};
return [{
name: 'assets',
mode: 'none',
entry: {
overview: './src/overview/assets/index.ts',
'java-runtime': './src/java-runtime/assets/index.ts',
'beginner-tips': './src/beginner-tips/assets/index.tsx',
'ext-guide': './src/ext-guide/assets/index.ts',
welcome: './src/welcome/assets/index.ts',
classpath: './src/classpath/assets/index.tsx',
'formatter-settings': './src/formatter-settings/assets/index.tsx',
'install-jdk': './src/install-jdk/assets/index.tsx'
},
module: {
rules: [{
test: /\.ts(x?)$/,
exclude: /node_modules/,
use: 'ts-loader'
}, {
test: /\.(scss)$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
[
"autoprefixer",
{
// Options
},
],
],
},
}
}, {
loader: 'sass-loader'
}]
}, {
test: /\.(jpg|png|svg|ico|icns)$/,
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 200000,
},
},
}, {
test: /\.(css)$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}]
}, {
test: /\.(woff2|ttf)$/,
type: 'asset/inline',
}]
},
output: {
filename: 'assets/[name]/index.js',
path: path.resolve(__dirname, 'out'),
publicPath: '/',
devtoolModuleFilenameTemplate: "../[resource-path]"
},
plugins: [
new webpack.ProvidePlugin({
fallback: { 'process/browser': require.resolve('process/browser'), }
}),
],
devtool: 'source-map',
resolve: {
extensions: ['.js', '.ts', '.tsx']
}
}, {
name: 'extension',
target: 'node',
mode: 'none',
entry: {
extension: './src/extension.ts'
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: 'ts-loader'
}]
},
resolve: {
modules: ['node_modules', path.resolve(__dirname, 'src')],
mainFiles: ['index'],
extensions: ['.js', '.ts', '.json'],
preferRelative: true
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'out'),
libraryTarget: "commonjs2",
publicPath: '/',
devtoolModuleFilenameTemplate: "../[resource-path]"
},
externals: {
'applicationinsights-native-metrics': 'commonjs applicationinsights-native-metrics', // ignored because we don't ship native module
'diagnostic-channel-publishers': 'commonjs diagnostic-channel-publishers',
vscode: 'commonjs vscode'
},
devtool: 'source-map'
}]
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。