代码拉取完成,页面将自动刷新
import path from 'path';
import url from 'url';
import TerserPlugin from "terser-webpack-plugin";
const cwd = url.fileURLToPath (import.meta.url);
const outputDirectory = path.normalize (path.join (path.dirname (cwd), 'dist'))
export default {
entry : './ts/ccxt.ts',
output: {
path: outputDirectory,
filename: 'ccxt.browser.js',
library: {
type: 'self', // we are targeting the browser (including webworkers)
name: 'ccxt',
},
chunkFormat: 'array-push',
chunkLoading: 'jsonp',
},
cache: {
type: 'filesystem',
},
module: {
rules: [{
test: /\.ts$/,
use: 'ts-loader',
exclude: [ /node_modules/ ],
sideEffects: false,
}],
},
resolve: {
extensions: [ '.ts' ],
// this line is needed because we use import xxx.js in ccxt
extensionAlias: {
'.js': [ '.js', '.ts' ],
},
},
mode: 'production',
target: 'web',
optimization: {
minimize: false,
minimizer: [new TerserPlugin ({ extractComments: false })],
usedExports: true, // these two lines line turns on tree shaking
concatenateModules: false,
},
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。