UNPKG

1.14 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const runner_utils_1 = require("@tarojs/runner-utils");
4const Chain = require("webpack-chain");
5exports.default = (_appPath, _config) => {
6 const chain = new Chain();
7 chain.merge({
8 resolve: {
9 extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.vue'],
10 mainFields: ['main:h5', 'browser', 'module', 'jsnext:main', 'main'],
11 symlinks: true,
12 alias: {
13 // Note: link 本地依赖调试,runtime 包需要指向本地 node_modules 顶层的 runtime,保证闭包值 Current 一致,shared 也一样
14 '@tarojs/runtime': require.resolve('@tarojs/runtime'),
15 '@tarojs/shared': require.resolve('@tarojs/shared/dist/shared.esm.js')
16 }
17 },
18 resolveLoader: {
19 modules: ['node_modules']
20 }
21 });
22 chain.resolve
23 .plugin('MultiPlatformPlugin')
24 .use(runner_utils_1.MultiPlatformPlugin, ['described-resolve', 'resolve', {
25 chain
26 }]);
27 return chain;
28};
29//# sourceMappingURL=base.conf.js.map
\No newline at end of file