Fix build issues
This commit is contained in:
parent
dd21c20b3a
commit
af616042f3
5 changed files with 21 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,3 +4,4 @@ node_modules
|
|||
.firebase
|
||||
yarm-error.log
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ module.exports = (env, argv) => ({
|
|||
entry: {
|
||||
main: [PATHS.entryPoint],
|
||||
},
|
||||
|
||||
externals: [
|
||||
nodeExternals({
|
||||
allowlist: [/(^shared)/],
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ module.exports = {
|
|||
enforce: 'pre',
|
||||
use: ['source-map-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: {
|
||||
loader: 'file-loader',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"downlevelIteration": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true,
|
||||
"composite": true,
|
||||
"lib": ["dom", "es2017"]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
const path = require('path');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin;
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const TsConfigWebpackPlugin = require('ts-config-webpack-plugin');
|
||||
|
||||
const PATHS = {
|
||||
entryPoint: path.resolve(__dirname, 'src/main.ts'),
|
||||
|
|
@ -30,15 +27,18 @@ module.exports = (env, argv) => ({
|
|||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
plugins: [
|
||||
// Cleans the dist folder before the build starts
|
||||
new CleanWebpackPlugin(),
|
||||
// Generate a base html file and injects all generated css and js files
|
||||
new HtmlWebpackPlugin(),
|
||||
// Multi threading typescript loader configuration with caching for .ts and .tsx files
|
||||
// see https://github.com/namics/webpack-config-plugins/tree/master/packages/ts-config-webpack-plugin/config
|
||||
new TsConfigWebpackPlugin(),
|
||||
],
|
||||
plugins: [],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
},
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts'],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue