Upgrade node to 16.13 (#163)
* Updated base packages and regenerated package-lock * Added babel plugin to eslint, cleaned up webpack config * Version requirements for node/npm in README * Readded compass and css, removed by mistake * Fixed jest testing * Fixing lint issues. * Moved import to use webapp redux package * Fixed final jest issue * Modified packages and rebuild packagelock for node 16.14 * Add src and mattermost-redux alias * Update README.md Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com> * Adding nvm and removing the default type from the package * Delete root package-lock.json * Pinned to webapp v7, rebuild package log * fixed imports with TS * change tsconfig location pointer * updates for vscode-eslint to work with tsconfig subpath * don't import webapp for tests * remove "v" from .nvmrc --------- Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com> Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
c0b3c8b760
commit
121997e77a
13 changed files with 27601 additions and 13223 deletions
|
@ -5,12 +5,7 @@ const path = require('path');
|
|||
const PLUGIN_ID = require('../plugin.json').id;
|
||||
|
||||
const NPM_TARGET = process.env.npm_lifecycle_event; //eslint-disable-line no-process-env
|
||||
let mode = 'production';
|
||||
let devtool = '';
|
||||
if (NPM_TARGET === 'debug' || NPM_TARGET === 'debug:watch') {
|
||||
mode = 'development';
|
||||
devtool = 'source-map';
|
||||
}
|
||||
const isDev = NPM_TARGET === 'debug' || NPM_TARGET === 'debug:watch';
|
||||
|
||||
const plugins = [];
|
||||
if (NPM_TARGET === 'build:watch' || NPM_TARGET === 'debug:watch') {
|
||||
|
@ -34,11 +29,15 @@ if (NPM_TARGET === 'build:watch' || NPM_TARGET === 'debug:watch') {
|
|||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
const config = {
|
||||
entry: [
|
||||
'./src/index.tsx',
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'mattermost-redux': path.resolve(__dirname, 'node_modules/@mattermost/webapp/packages/mattermost-redux/src'),
|
||||
},
|
||||
modules: [
|
||||
'src',
|
||||
'node_modules',
|
||||
|
@ -94,7 +93,12 @@ module.exports = {
|
|||
publicPath: '/',
|
||||
filename: 'main.js',
|
||||
},
|
||||
devtool,
|
||||
mode,
|
||||
mode: (isDev) ? 'eval-source-map' : 'production',
|
||||
plugins,
|
||||
};
|
||||
|
||||
if (isDev) {
|
||||
Object.assign(config, {devtool: 'eval-source-map'});
|
||||
}
|
||||
|
||||
module.exports = config;
|
||||
|
|
Reference in a new issue