From 73e6916dfb4956e733be0542bb3f8bf87fd89925 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 12 九月 2025 17:16:07 +0800 Subject: [PATCH] 起落架DNC初始化代码 --- build/webpack.test.conf.js | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/build/webpack.test.conf.js b/build/webpack.test.conf.js new file mode 100644 index 0000000..7d0f45e --- /dev/null +++ b/build/webpack.test.conf.js @@ -0,0 +1,32 @@ +'use strict'; +// This is the webpack config used for unit tests. + +const utils = require('./utils'); +const webpack = require('webpack'); +const merge = require('webpack-merge'); +const baseWebpackConfig = require('./webpack.base.conf'); + +const webpackConfig = merge(baseWebpackConfig, { + // use inline sourcemap for karma-sourcemap-loader + module: { + rules: utils.styleLoaders() + }, + devtool: '#inline-source-map', + resolveLoader: { + alias: { + // necessary to to make lang="scss" work in test when using vue-loader's ?inject option + // see discussion at https://github.com/vuejs/vue-loader/issues/724 + 'scss-loader': 'sass-loader' + } + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': require('../config/test.env') + }) + ] +}); + +// no need for app entry during tests +delete webpackConfig.entry; + +module.exports = webpackConfig; -- Gitblit v1.9.3