Closed hdn8 closed 7 years ago
I have a dependency that requires loading a json, but to work with webpack I need to include json-loader, else throws:
... /app/node_modules/mime/types.json Unexpected token (1:27) You may need an appropriate loader to handle this file type.
Can be reproduced installing and instantiating the node-mime module.
Adding the loader manually to bozon/lib/building/tasks.js it solves the problem:
bozon.task('scripts:renderer', function () { var webpack = bozon.requireLocal('webpack-stream') return bozon.src('javascripts/renderer/application.*').pipe(webpack({ target: 'electron', output: { filename: 'application.js' }, module: { loaders: [ { test: /\.json$/, loader: "json-loader" } ] } })).pipe(bozon.dest('javascripts/renderer')) })
Can this be done somehow in the bozon config files? I'm not so clear on how to do webpack config with the bozon config files setup.
Added support for webpack.config.js in v0.7.5
webpack.config.js
I have a dependency that requires loading a json, but to work with webpack I need to include json-loader, else throws:
Can be reproduced installing and instantiating the node-mime module.
Adding the loader manually to bozon/lib/building/tasks.js it solves the problem:
Can this be done somehow in the bozon config files? I'm not so clear on how to do webpack config with the bozon config files setup.