I am trying to set up a WatermelonDB project for web, by reading the documentation here. I set up a create-react-app app and ejected (by running the eject script) to allow me to edit the webpack.config.dev file so that I can add the necessary lines of code. However, the build breaks when I add globalObject: 'this' to the output object.
Error message in console
> $ npm start
> watermelon-test@0.1.0 start /Users/rorysmith/WebstormProjects/watermelon-test
> node scripts/start.js
Failed to compile.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.output has an unknown property 'globalObject'. These properties are valid:
object { auxiliaryComment?, chunkFilename?, crossOriginLoading?, chunkLoadTimeout?, devtoolFallbackModuleFilenameTemplate?, devtoolLineToLine?, devtoolModuleFilenameTemplate?, filename?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateFunction?, hotUpdateMainFilename?, jsonpFunction?, library?, libraryTarget?, libraryExport?, path?, pathinfo?, publicPath?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine? }
Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
Expected Behaviour
webpack-dev-server not to crash.
Current Behaviour
webpack-dev-server crashes.
Possible Solution
Adding globalObject to the API schema. How do I do this? I don't know much about webpack.
Context (Environment)
create-react-app 1.5.2 which uses react 16.5.2, webpack 3.8.1 and webpack-dev-server 2.11.3.
Description of Issue
I am trying to set up a WatermelonDB project for web, by reading the documentation here. I set up a create-react-app app and ejected (by running the
eject
script) to allow me to edit the webpack.config.dev file so that I can add the necessary lines of code. However, the build breaks when I addglobalObject: 'this'
to theoutput
object.Error message in console
Expected Behaviour
webpack-dev-server not to crash.
Current Behaviour
webpack-dev-server crashes.
Possible Solution
Adding
globalObject
to the API schema. How do I do this? I don't know much about webpack.Context (Environment)
create-react-app 1.5.2 which uses react 16.5.2, webpack 3.8.1 and webpack-dev-server 2.11.3.