forked from flowers1225/threejs-earth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
executable file
·52 lines (48 loc) · 1.58 KB
/
webpack.config.js
1
const path = require('path');const webpack = require('webpack');const DllReferencePlugin = webpack.DllReferencePlugin;const threeModule = path.join(__dirname, '/node_modules/three/');const TrackballControls = path.join(threeModule, 'examples/js/controls/TrackballControls.js');const EffectComposer = path.join(threeModule, 'examples/js/postprocessing/EffectComposer.js');const RenderPass = path.join(threeModule, 'examples/js/postprocessing/RenderPass.js');const ShaderPass = path.join(threeModule, 'examples/js/postprocessing/ShaderPass.js');const MaskPass = path.join(threeModule, 'examples/js/postprocessing/MaskPass.js');const CopyShader = path.join(threeModule, 'examples/js/shaders/CopyShader.js');module.exports = { entry: { main: './src/js/index.js', }, output: { path: '.', filename: './dist/js/[name].js', }, module: { loaders: [ { test: /\.js$/, exclude: /(node_modules|dist)/, loaders: ['babel-loader', 'eslint-loader'] } ] }, resolve: { alias: { 'TrackballControls': TrackballControls, 'EffectComposer': EffectComposer, 'RenderPass': RenderPass, 'ShaderPass': ShaderPass, 'MaskPass': MaskPass, 'CopyShader': CopyShader, } }, plugins: [ new DllReferencePlugin({ context: __dirname, manifest: require('./manifest.json') }) ], externals: { '$':'window.$', 'global' : 'window.global' }};