Begin updating dependent libraries to use sync'd webpack builds w/ watches
This commit is contained in:
1 parent
3e1e456cc2
commit
e250ac0c50
21 files changed
+5303
-1153
No files matched your search
@@ -0,0 +1,57 @@
|
||||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
const path = require('path');
|
||||
const common = require('./webpack.common');
|
||||
|
||||
const SRC_DIR = path.join(__dirname, '../src');
|
||||
const DIST_DIR = path.join(__dirname, '../dist');
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
const commonConfig = common(env, argv);
|
||||
|
||||
return merge(commonConfig, {
|
||||
mode: 'development',
|
||||
devtool: 'cheap-module-source-map',
|
||||
output: {
|
||||
path: DIST_DIR,
|
||||
filename: 'bundle.js',
|
||||
publicPath: '/public/',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(gif|jp?g|png|svg|ico)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[path][name].[ext]',
|
||||
context: SRC_DIR,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(ttf|eot|woff|woff2)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
devServer: {
|
||||
hot: true,
|
||||
inline: true,
|
||||
compress: true,
|
||||
contentBase: DIST_DIR,
|
||||
port: 3000,
|
||||
writeToDisk: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user