mirror of
https://github.com/MutableLoss/6502SimDesktop.git
synced 2024-11-22 13:33:23 +00:00
41 lines
884 B
JavaScript
41 lines
884 B
JavaScript
/**
|
|
* Base webpack config used across other specific configs
|
|
*/
|
|
|
|
import path from 'path';
|
|
import validate from 'webpack-validator';
|
|
import { dependencies as externals } from './package.json';
|
|
|
|
export default validate({
|
|
module: {
|
|
loaders: [{
|
|
test: /\.jsx?$/,
|
|
loaders: ['babel-loader'],
|
|
exclude: /node_modules/
|
|
}, {
|
|
test: /\.json$/,
|
|
loader: 'json-loader'
|
|
}]
|
|
},
|
|
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
|
|
// https://github.com/webpack/webpack/issues/1114
|
|
libraryTarget: 'commonjs2'
|
|
},
|
|
|
|
/**
|
|
* Determine the array of extensions that should be used to resolve modules.
|
|
*/
|
|
resolve: {
|
|
extensions: ['', '.js', '.jsx', '.json'],
|
|
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
|
|
},
|
|
|
|
plugins: [],
|
|
|
|
externals: Object.keys(externals || {})
|
|
});
|