Rohan Sircar
e5c3802e92
Added odin logger Used macwire and tagging for DI JS libs now embedded with webpack instead of server from CDN Refactored the application into components and pages Added Chartjs and Fusejs demo with scalablytyped typings
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
var webpack = require('webpack');
|
|
var merge = require('webpack-merge');
|
|
var generated = require('./scalajs.webpack.config');
|
|
var Path = require('path');
|
|
const rootDir = Path.resolve(__dirname, '../../../..');
|
|
|
|
var local = {
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader']
|
|
},
|
|
{
|
|
test: /\.(ttf|eot|woff|png|glb|jpeg|jpg|mp4|jsn)$/,
|
|
use: 'file-loader'
|
|
},
|
|
{
|
|
test: /\.(eot)$/,
|
|
use: 'url-loader'
|
|
}
|
|
]
|
|
},
|
|
devServer: {
|
|
contentBase: [
|
|
Path.resolve(__dirname, 'dev'), // fastOptJS output
|
|
Path.resolve(rootDir, 'assets') // project root containing index.html
|
|
],
|
|
watchContentBase: true,
|
|
hot: false,
|
|
hotOnly: false, // only reload when build is successful
|
|
inline: true, // live reloading
|
|
watchOptions: {
|
|
poll: 1000,
|
|
ignored: ["node_modules"]
|
|
}
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
$: 'jquery/src/jquery',
|
|
jquery: 'jquery/src/jquery'
|
|
})
|
|
]
|
|
};
|
|
|
|
module.exports = merge(generated, local);
|