Open juanmaguitar opened 5 years ago
When doing npm run build in the project staff/juanma-garrido/domain-demo it generates the lib folder w/ the ES5 version of the code
npm run build
staff/juanma-garrido/domain-demo
lib
By running npm run build it will execute the following code that will use the lib version of the code
const Domain = require('./lib') const domain = new Domain() domain .get('list_students_use_case') .execute() .then(console.log) // eslint-disable-line
This works fine
But when I try to use this lib version of the code from staff/juanma-garrido/domain-demo I get this error when sui-bundler dev...
sui-bundler dev
Failed to compile. /Volumes/RINGO/PROJECTS/2018/SCHIBSTED/training-sui/schibsted-sui-tools-training/staff/juanma-garrido/domain-demo/lib/config/base.js Module Error (from ../node_modules/thread-loader/dist/cjs.js): /Volumes/RINGO/PROJECTS/2018/SCHIBSTED/training-sui/schibsted-sui-tools-training/staff/juanma-garrido/domain-demo/lib/config/base.js 1:13 error Delete `;` prettier/prettier 3:32 error Replace `"__esModule"` with `'__esModule'` prettier/prettier 5:3 error Delete `;` prettier/prettier 8:2 error Delete `;` prettier/prettier 9:33 error Replace `;` with `⏎` prettier/prettier ✖ 5 problems (5 errors, 0 warnings) 5 errors, 0 warnings potentially fixable with the `--fix` option.
It seems that sui-bundler is evaluating w/ the linter the generated code of the lib folder Any idea of how to solve this?
sui-bundler
Notes:
If I do import Domain from '../../domain-demo/src from staff/juanma-garrido/sui-bundler-demo/src/app.js everything works fine
import Domain from '../../domain-demo/src
staff/juanma-garrido/sui-bundler-demo/src/app.js
If I do npm run build, the generated code in public also works fine
public
I think that is because you're running the server into folder staff/juanma-garrido/domain-demo and the relative path can't go to any resource upper than this folder.
When doing
npm run build
in the projectstaff/juanma-garrido/domain-demo
it generates thelib
folder w/ the ES5 version of the codeBy running
npm run build
it will execute the following code that will use thelib
version of the codeThis works fine
But when I try to use this
lib
version of the code fromstaff/juanma-garrido/domain-demo
I get this error whensui-bundler dev
...It seems that
sui-bundler
is evaluating w/ the linter the generated code of thelib
folder Any idea of how to solve this?Notes:
If I do
import Domain from '../../domain-demo/src
fromstaff/juanma-garrido/sui-bundler-demo/src/app.js
everything works fineIf I do
npm run build
, the generated code inpublic
also works fine