2020-12-27 14:58:19 +00:00
|
|
|
var webpack = require('webpack');
|
2020-12-29 06:57:37 +00:00
|
|
|
var merge = require('webpack-merge');
|
|
|
|
var generated = require('./scalajs.webpack.config');
|
|
|
|
var Path = require('path');
|
2020-12-27 14:58:19 +00:00
|
|
|
const rootDir = Path.resolve(__dirname, '../../../..');
|
2020-12-29 06:57:37 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
})
|
|
|
|
]
|
2020-12-27 14:58:19 +00:00
|
|
|
};
|
2020-12-29 06:57:37 +00:00
|
|
|
|
|
|
|
module.exports = merge(generated, local);
|