Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require("path"); // nodejs does not understand ES6 modules
- const glob = require("webpack-glob-entries");
- const JavaScriptObfuscator = require('webpack-obfuscator');
- module.exports = {
- // context: __dirname,
- entry: {
- bundle: "./src/react/App.jsx",
- aframeOthers: Object.values(glob("./src/aframe/**/*.js")),
- thirdparty: [
- "./third-party/aframe-v.0.7.0.js",
- "./third-party/aframe-utils.js",
- "./third-party/aframe-animation-component.min.js",
- "./third-party/aframe-extras-controls.min.js",
- "./third-party/aframe-look-at-component.js",
- "./third-party/aframe-touch-rotation-controls.smischanged.js",
- "./third-party/sonic.js"
- ]
- },
- output: {
- path: path.resolve("public"), // path.resolve turned 'public' in absolute path
- filename: "[name].js"
- },
- module: {
- rules: [
- {
- enforce: "pre", // Preloader
- test: /\.jsx?$/,
- exclude: /node_modules/
- },
- {
- test: /\.jsx?$/,
- loader: "babel-loader"
- }
- ]
- },
- plugins: [
- new JavaScriptObfuscator ({
- rotateUnicodeArray: false
- })
- ],
- resolve: {
- extensions: [".jsx", ".js"]
- },
- devServer: {
- host: "0.0.0.0",
- port: 8080,
- hot: false,
- inline: false,
- historyApiFallback: {
- index: "/public/"
- }
- }
- };
Add Comment
Please, Sign In to add comment