Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Make "yarn build" work with "yarn install --prod"
Browse files Browse the repository at this point in the history
  • Loading branch information
mythmon committed Jan 23, 2019
1 parent 80e3e5f commit af6ff03
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 58 deletions.
17 changes: 0 additions & 17 deletions config/webpack.config.base.js
@@ -1,5 +1,4 @@
const autoprefixer = require('autoprefixer');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const path = require('path');
Expand Down Expand Up @@ -46,22 +45,6 @@ module.exports = {
module: {
strictExportPresence: true,
rules: [
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
Expand Down
21 changes: 21 additions & 0 deletions config/webpack.config.dev.js
Expand Up @@ -8,6 +8,7 @@ const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeM
const baseConfig = require('./webpack.config.base');
const getClientEnvironment = require('./env');
const paths = require('./paths');
const eslintFormatter = require('react-dev-utils/eslintFormatter');

// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
Expand Down Expand Up @@ -50,6 +51,26 @@ const config = {
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
],
module: {
rules: [
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
],
},
output: {
// Add /* filename */ comments to generated require()s in the output.
pathinfo: true,
Expand Down
82 changes: 41 additions & 41 deletions package.json
Expand Up @@ -7,18 +7,51 @@
"type": "git",
"url": "https://github.com/mozilla/delivery-console"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js test --env=jsdom",
"test:ci": "CI=true yarn test --runInBand",
"test:watch": "yarn test --watch",
"lint": "therapist use lint:all",
"lint:fix": "therapist use fix:all"
},
"dependencies": {
"@babel/core": "7.2.2",
"@babel/plugin-proposal-decorators": "7.3.0",
"@babel/polyfill": "7.2.5",
"@babel/runtime": "7.3.1",
"antd": "3.12.4",
"auth0-js": "9.9.1",
"autobind-decorator": "2.4.0",
"autoprefixer": "9.4.6",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.5",
"babel-plugin-import": "1.11.0",
"babel-preset-react-app": "7.0.0",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.2",
"connected-react-router": "5.0.1",
"css-loader": "2.1.0",
"cssnano": "4.1.8",
"date-fns": "1.30.1",
"extract-css-chunks-webpack-plugin": "3.3.2",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"generate-json-webpack-plugin": "0.3.1",
"html-webpack-plugin": "4.0.0-beta.5",
"immutable": "3.8.2",
"less": "3.9.0",
"less-loader": "4.1.0",
"lodash": "4.17.11",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"promise": "8.0.2",
"raven-js": "3.27.0",
"react": "16.7.0",
"react-copy-to-clipboard": "5.0.1",
"react-dev-utils": "7.0.1",
"react-dom": "16.7.0",
"react-redux": "5.1.1",
"react-router": "4.3.1",
Expand All @@ -27,32 +60,18 @@
"redux": "4.0.1",
"redux-immutable": "4.0.0",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js test --env=jsdom",
"test:ci": "CI=true yarn test --runInBand",
"test:watch": "yarn test --watch",
"lint": "therapist use lint:all",
"lint:fix": "therapist use fix:all"
"redux-thunk": "2.3.0",
"style-loader": "0.23.1",
"sw-precache-webpack-plugin": "0.11.5",
"uglifyjs-webpack-plugin": "2.1.1",
"url-loader": "1.1.2",
"webpack": "4.29.0",
"webpack-manifest-plugin": "2.0.4",
"webpack-merge": "4.2.1"
},
"devDependencies": {
"@babel/core": "7.2.2",
"@babel/plugin-proposal-decorators": "7.3.0",
"@babel/polyfill": "7.2.5",
"@babel/runtime": "7.3.1",
"autoprefixer": "9.4.6",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-loader": "8.0.5",
"babel-plugin-import": "1.11.0",
"babel-preset-react-app": "7.0.0",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"css-loader": "2.1.0",
"cssnano": "4.1.8",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"enzyme": "3.8.0",
Expand All @@ -66,37 +85,18 @@
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.12.4",
"extract-css-chunks-webpack-plugin": "3.3.2",
"faker": "4.1.0",
"fetch-mock": "7.3.0",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"generate-json-webpack-plugin": "0.3.1",
"html-webpack-plugin": "4.0.0-beta.5",
"jest": "23.6.0",
"jest-immutable-matchers": "2.0.1",
"less": "3.9.0",
"less-loader": "4.1.0",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"prettier": "1.16.1",
"promise": "8.0.2",
"raf": "3.4.1",
"react-dev-utils": "7.0.1",
"react-testing-library": "5.4.4",
"resolve": "1.10.0",
"style-loader": "0.23.1",
"stylelint": "9.10.1",
"stylelint-config-standard": "18.2.0",
"stylelint-order": "2.0.0",
"sw-precache-webpack-plugin": "0.11.5",
"uglifyjs-webpack-plugin": "2.1.1",
"url-loader": "1.1.2",
"webpack": "4.29.0",
"webpack-dev-server": "3.1.14",
"webpack-manifest-plugin": "2.0.4",
"webpack-merge": "4.2.1",
"whatwg-fetch": "3.0.0"
},
"jest": {
Expand Down

0 comments on commit af6ff03

Please sign in to comment.