ut-webpack
v8.2.3
Published
Webpack shared config
Downloads
106
Readme
ut-webpack
Neutrino based preset for usage with UT framework.
Usage
Install
ut-webpack
globally.Create a
utWebpack.js
file in your project root, with the following content:module.exports = ({utWebpack}) => ({ options: { mains: { admin: 'admin', service: 'service', solution: 'solution', adminPortal: 'adminPortal', cmsPortal: 'cmsPortal' } }, use: [utWebpack({...options})] });
Edit
package.json
to include:{ "scripts": { "start": "ut-webpack-dev-server --mode development --open", "build": "ut-webpack --mode production", "release": "ut-webpack --mode production && ut-release" } }
Use npm run start
to start the development server with hot reload enabled.
Use npm run build
to build the production front end.
Configuration
The preset accepts the following options as object properties in the first argument :
publicPath
- sets Webpack output.publicPath, the default is:'/a/browser/'
source
- sets Neutrino options.source, the default is:'browser'
output
- sets Neutrino options.output, the default is:path.resolve('dist')
proxy
- sets Webpack devServer.proxy, the default is:{ context: ['!/a/browser/**'], target: 'http://localhost:8004' }
cssImport
- sets postcss-import path, the default is:path.resolve('impl/browser/config')
devModulesPath
- sets Neutrino path, the default is:dev
csp
- Allows content security options to be passed to csp-html-webpack-pluginhtml
- Allows html options to be passed to html-webpack-plugin