@blockv/threejs-to-v3d
Version:
Converts any format supported by ThreeJS to V3D.
50 lines (41 loc) • 1 kB
JavaScript
//
// WebPack config file
var webpack = require('webpack');
module.exports = {
plugins: [],
module: {
loaders: []
},
externals: []
};
// The app's starting file
module.exports.entry = "./src/index.js";
// The final app's JS output file
module.exports.output = {
path: __dirname + "/dist/",
filename: "threejs-to-v3d.min.js",
libraryTarget:"var",
library:"ThreeJSConverter"
};
// Output a sourcemap
module.exports.devtool = "source-map";
// Compile support for ES6 classes and React etc
module.exports.module.loaders.push({
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ["es2017","es2015"]
}
});
// Minify javascript
module.exports.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
output: {
comments: false
}
}));
// Prevent NodeJS modules from being bundled
module.exports.externals.push({ fs: true, "fs.promised": true });