diff --git a/index.dev.html b/index.dev.html
new file mode 100644
index 0000000..91c4f41
--- /dev/null
+++ b/index.dev.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+ Chaotic Backup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package.json b/package.json
index 91f8b60..79043ba 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "2.0.0",
"description": "Chaotic Backup",
"scripts": {
- "start": "webpack-dev-server -d --inline --host 0.0.0.0 --history-api-fallback",
+ "start": "webpack-dev-server -d --inline",
"build": "webpack -p"
},
"repository": {
diff --git a/webpack.config.babel.js b/webpack.config.babel.js
index 8a5cfb7..b84a93f 100644
--- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -10,6 +10,13 @@ const devMode = (process.env.NODE_ENV !== 'production' && process.argv.indexOf('
const config = {
entry: ['@babel/polyfill', `${__dirname}/src/components/index.js`],
+ devServer: {
+ host: '0.0.0.0',
+ historyApiFallback: {
+ index: 'index.dev.html',
+ },
+ },
+
output: {
path: `${__dirname}/build`,
publicPath: '/build/',
@@ -22,9 +29,9 @@ const config = {
cache: true,
parallel: true,
sourceMap: true,
- extractComments: true
+ extractComments: true,
}),
- new OptimizeCSSAssetsPlugin({})
+ new OptimizeCSSAssetsPlugin({}),
],
splitChunks: {
cacheGroups: {
@@ -32,30 +39,30 @@ const config = {
name: 'styles',
test: /\.css$/,
chunks: 'all',
- enforce: true
- }
- }
- }
+ enforce: true,
+ },
+ },
+ },
},
module: {
rules: [
{
- test: /\.(js|jsx)$/,
+ test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
- 'presets': [
+ presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-flow',
],
- 'plugins': [
+ plugins: [
'@babel/plugin-transform-runtime',
- ['@babel/plugin-proposal-decorators', {'legacy': true }],
- ['@babel/plugin-proposal-class-properties', { 'loose': true }]
- ]
- }
+ ['@babel/plugin-proposal-decorators', {legacy: true }],
+ ['@babel/plugin-proposal-class-properties', { loose: true }],
+ ],
+ },
},
{
test: /\.s?[ac]ss$/,
@@ -64,8 +71,8 @@ const config = {
'css-loader',
'sass-loader',
],
- }
- ]
+ },
+ ],
},
resolve: {
@@ -84,7 +91,7 @@ const config = {
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
- })
+ }),
],
};