代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/AR.js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
var path = require('path');
module.exports = (env, argv) => {
let devtool = false;
if (argv.mode === 'development') {
devtool = 'inline-source-map';
}
console.log(`${argv.mode} build`);
const externals = {
aframe: {
commonjs: 'aframe',
commonjs2: 'aframe',
amd: 'aframe',
root: 'AFRAME' // indicates global variable
},
three: {
commonjs: 'three',
commonjs2: 'three',
amd: 'three',
root: 'THREE' // indicates global variable
}
};
const module = {
rules: [
{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
options: {
inline: 'no-fallback'
}
}
}
]
};
return [{
name: 'aframe',
devtool,
entry: './aframe/src/index.js',
output: {
library: 'ARjs',
path: path.resolve(__dirname, 'aframe/build'),
filename: 'aframe-ar.js',
libraryTarget: 'umd',
globalObject: 'this'
},
resolve: {
alias: {
jsartoolkit: '@ar-js-org/artoolkit5-js',
threexArmarkercontrols$: path.resolve(__dirname, 'three.js/src/threex/arjs-markercontrols.js')
}
},
module,
externals
},
{
name: 'aframe-nft',
devtool,
entry: './aframe/src/index-nft.js',
output: {
library: 'ARjs',
path: path.resolve(__dirname, 'aframe/build'),
filename: 'aframe-ar-nft.js',
libraryTarget: 'umd',
globalObject: 'this'
},
resolve: {
alias: {
jsartoolkit: '@ar-js-org/artoolkit5-js',
threexArmarkercontrols$: path.resolve(__dirname, 'three.js/src/threex/arjs-markercontrols.js')
}
},
module,
externals
},
{
name: 'aframe-location-only',
devtool,
entry: './aframe/src/location-based/index.js',
output: {
library: 'ARjs',
path: path.resolve(__dirname, 'aframe/build'),
filename: 'aframe-ar-location-only.js',
libraryTarget: 'umd',
globalObject: 'this'
},
module,
externals
},
{
name: 'aframe-new-location-only',
devtool,
entry: './aframe/src/new-location-based/index.js',
output: {
library: 'ARjs',
path: path.resolve(__dirname, 'aframe/build'),
filename: 'aframe-ar-new-location-only.js',
libraryTarget: 'umd',
globalObject: 'this'
},
module,
externals
},
{
name: 'threex',
devtool,
entry: './three.js/src/index-threex.js',
output: {
library: 'THREEx',
path: path.resolve(__dirname, 'three.js/build'),
filename: 'ar-threex.js',
libraryTarget: 'umd',
globalObject: 'this'
},
resolve: {
alias: {
jsartoolkit: '@ar-js-org/artoolkit5-js',
threexArmarkercontrols$: path.resolve(__dirname, 'three.js/src/threex/arjs-markercontrols.js')
}
},
module,
externals: {
three: {
commonjs: 'three',
commonjs2: 'three',
amd: 'three',
root: 'THREE' // indicates global variable
}
}
},
{
name: 'threex-location-only',
devtool,
entry: './three.js/src/location-based/index.js',
output: {
library: 'THREEx',
path: path.resolve(__dirname, 'three.js/build'),
filename: 'ar-threex-location-only.js',
libraryTarget: 'umd',
globalObject: 'this'
},
module,
externals: {
three: {
commonjs: 'three',
commonjs2: 'three',
amd: 'three',
root: 'THREE' // indicates global variable
}
}
},
{
name: 'ar.js',
devtool,
entry: './three.js/src/index-arjs.js',
output: {
library: 'ARjs',
path: path.resolve(__dirname, 'three.js/build'),
filename: 'ar.js',
libraryTarget: 'umd',
globalObject: 'this'
},
resolve: {
alias: {
jsartoolkit: '@ar-js-org/artoolkit5-js',
threexArmarkercontrols$: path.resolve(__dirname, 'three.js/src/threex/arjs-markercontrols.js')
}
},
module,
externals: {
three: {
commonjs: 'three',
commonjs2: 'three',
amd: 'three',
root: 'THREE' // indicates global variable
}
}
}
];
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。