Open aneogiarcadix opened 6 years ago
did it work before?
Why not upgrade to latest and use WP 4? every thing is much easier
@ScriptedAlchemy I'm actually seeing this problem on webpack 4 right now. My impression is that it has something to do with externalization: I encountered this problem when I went to fix my externals
webpack configuration. When everything was included in the same server bundle, it worked fine; when I fixed the externalization, things broke.
The weird thing to me is that it's default
. Is that referring to the webpack entrypoint, which would be the default
for a module?
Hmm... It also only shows up when I use webpack-node-externals
, which seems strange to me. Why would that make a difference?
It's working fine when I use the example code for webpack externals configuration.
I get this error in a Typescript project of mine. So I cloned the universal-demo project and changed things to typescript( except server/index.js ). The project builds successfully, and then I get the same error. What am I missing here? The only changes I have made to the webpack configs is adding at-loader to the rules and including ts and tsx to resolve extensions.
Current project structure: tsconfig.json { "compileOnSave": true, "exclude": ["node_modules"], "compilerOptions": { "noStrictGenericChecks": true, "allowJs": true, "declaration": false, "noResolve": false, "jsx": "react", "module": "commonjs", "target": "es2015", "experimentalDecorators": true, "sourceMap": true, "noImplicitAny": false, "noImplicitReturns": true, "outDir": "./dist/", "skipLibCheck": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", //"types": [ "node" ], "typeRoots": [] } }
sample : https://github.com/aneogiarcadix/universal-demo-ts