Modules all the way

This commit is contained in:
Tim Schaub
2020-02-20 18:30:09 -07:00
parent ae70a1fb9d
commit c301d2413b
29 changed files with 316 additions and 173 deletions

View File

@@ -1,7 +1,10 @@
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
import TerserPlugin from 'terser-webpack-plugin';
import path, {dirname} from 'path';
import {fileURLToPath} from 'url';
module.exports = {
const baseDir = dirname(fileURLToPath(import.meta.url));
export default {
entry: './build/index.js',
devtool: 'source-map',
mode: 'production',
@@ -18,7 +21,7 @@ module.exports = {
},
include: [
path.join(
__dirname,
baseDir,
'..',
'node_modules',
'@mapbox',