UNPKG

viam-projectv-scan

Version:

ViaCheck deposit application

47 lines (45 loc) 1.15 kB
var path = require('path'); module.exports = { entry: './src/index.js', //mode: 'development', output: { path: path.resolve(__dirname, 'build'), filename: 'index.js', libraryTarget: 'commonjs2' // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide. }, resolve: { alias: { react: path.resolve('./node_modules/react'), 'react-dom': path.resolve('./node_modules/react-dom'), graphql: path.resolve('./node_modules/graphql') } }, module: { rules: [ { test: /\.js$/, include: path.resolve(__dirname, 'src'), exclude: /(node_modules|bower_components|build)/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react' ], plugins: [ '@babel/plugin-syntax-dynamic-import', '@babel/plugin-proposal-class-properties' ] } } }, { test: /\.(png|jpe?g|gif)$/i, use: [ { loader: 'url-loader' } ] }, { test: /\.css$/i, use: [ 'style-loader', 'css-loader' ] } ] } };