 SMC_LICENSE   = 'AGPLv3'
 WEBAPP_LIB    = misc_node.WEBAPP_LIB
 INPUT         = path.resolve(__dirname, WEBAPP_LIB)
-OUTPUT        = misc_node.OUTPUT_DIR
+OUTPUT        = path.resolve(__dirname, misc_node.OUTPUT_DIR)
 DEVEL         = "development"
 NODE_ENV      = process.env.NODE_ENV || DEVEL
 PRODMODE      = NODE_ENV != DEVEL

        #    modules: path.join(__dirname, "node_modules") # bind to modules;

    plugins: plugins

    'html-minify-loader':
        empty                : true   # KEEP empty attributes
        cdata                : true   # KEEP CDATA from scripts
        comments             : false
        removeComments       : true
        minifyJS             : true
        minifyCSS            : true
        collapseWhitespace   : true
        conservativeCollapse : true   # absolutely necessary, also see above in module.loaders/.html


                        includes: c.modules.map (m) ->  m.request
                )

# https://webpack.js.org/guides/migrating/#uglifyjsplugin-minimize-loaders
loaderOptions = new webpack.LoaderOptionsPlugin(
    minimize: true
    options:
        'html-minify-loader':
            empty                : true   # KEEP empty attributes
            cdata                : true   # KEEP CDATA from scripts
            comments             : false
            removeComments       : true
            minifyJS             : true
            minifyCSS            : true
            collapseWhitespace   : true
            conservativeCollapse : true   # absolutely necessary, also see above in module.loaders/.html
)

plugins = [
    cleanWebpackPlugin,
    #provideGlobals,
    setNODE_ENV,
    banner,
    loaderOptions
]

if STATICPAGES
