2017-09-05 04:59:34 +03:00
|
|
|
const path = require('path');
|
|
|
|
|
2018-04-03 14:13:47 +03:00
|
|
|
var xrPolyfill = {
|
2017-09-05 04:59:34 +03:00
|
|
|
entry: './polyfill/XRPolyfill.js',
|
|
|
|
output: {
|
|
|
|
filename: 'webxr-polyfill.js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
include: [
|
|
|
|
path.resolve(__dirname, "polyfill"),
|
|
|
|
],
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['env']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.js']
|
|
|
|
}
|
|
|
|
};
|
2018-04-03 14:13:47 +03:00
|
|
|
|
|
|
|
var xrVideoWorker = {
|
|
|
|
entry: './polyfill/XRWorkerPolyfill.js',
|
|
|
|
output: {
|
|
|
|
filename: 'webxr-worker.js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
include: [
|
|
|
|
path.resolve(__dirname, "polyfill"),
|
|
|
|
],
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['env']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.js']
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = [xrPolyfill, xrVideoWorker]
|