Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Warn the developer when a custom webpack.config.js fails #1085

Closed
kbariotis opened this issue Jun 11, 2017 · 6 comments
Closed

Warn the developer when a custom webpack.config.js fails #1085

kbariotis opened this issue Jun 11, 2017 · 6 comments
Labels

Comments

@kbariotis
Copy link
Contributor

Phenomic currently shallows custom webpack.config.js errors. Let the develop know when her custom configuration fails.

@MoOx
Copy link
Owner

MoOx commented Jun 11, 2017

Please for now use $ DEBUG=phenomic:plugin:webpack npm start to debug your config. I will make a change to only shallow when file does not exist (which was what I want in the first place) and also try to understand why "import" keyword does not work (since we are already using babel-register which should enable this)

@kbariotis
Copy link
Contributor Author

Aw awesome, didnt know that! Thanks.

@MoOx
Copy link
Owner

MoOx commented Jun 11, 2017

I added that in alpha 3, but alpha 4 will provide errors out of the box!

@medfreeman
Copy link
Contributor

Just note that in my setup, webpack.config.babel.js works properly with es6 syntax and imports.

@MoOx
Copy link
Owner

MoOx commented Jun 12, 2017 via email

@kbariotis kbariotis reopened this Jun 12, 2017
@bherila
Copy link

bherila commented Jul 2, 2017

I have

{
  "private": true,
  "devDependencies": {
    "@phenomic/cli": "^1.0.0",
    "@phenomic/core": "^1.0.0",
    "@phenomic/preset-react-app": "^1.0.0",
    "eslint": "^4.1.1",
    "react": "^15.0.0",
    "react-dom": "^15.0.0",
    "react-router": "^3.0.0"
  },
  "phenomic": {
    "presets": [
      "@phenomic/preset-react-app"
    ],
    "webpackConfig": "./webpack.config.js"
  },
  "scripts": {
    "start": "phenomic start",
    "build": "phenomic build"
  }
}

and the default webpack.config.js from here

and when I run DEBUG=phenomic:plugin:webpack npm start I get

@ start /Users/ben/Documents/projects/mw_phenomic
phenomic start

phenomic:plugin:webpack get middlewares +0ms
phenomic:plugin:webpack webpack.config.js is failing SyntaxError: Unexpected token import +110ms
phenomic:plugin:webpack webpack.config.babel.js is failing Error: Cannot find module '/Users/ben/Documents/projects/mw_phenomic/webpack.config.babel.js' +0ms
phenomic:plugin:webpack default webpack config used +84ms
...

@MoOx MoOx added the bug label Jul 12, 2017
@MoOx MoOx closed this as completed in be5f322 Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants