init projects
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
config.optimization = config.optimization || {};
|
||||
config.optimization.minimize = true;
|
||||
config.optimization.minimizer = [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
mangle: true, // Note: By default, mangle is set to true.
|
||||
compress: false, // Disable the transformations that reduce the code size.
|
||||
output: {
|
||||
beautify: false,
|
||||
},
|
||||
},
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
config.devServer = {
|
||||
...config.devServer,
|
||||
historyApiFallback: true
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
// {project}/webpack.config.d/sqljs.js
|
||||
config.resolve = {
|
||||
fallback: {
|
||||
fs: false,
|
||||
path: false,
|
||||
crypto: false,
|
||||
}
|
||||
};
|
||||
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
config.plugins.push(
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
'../../node_modules/sql.js/dist/sql-wasm.wasm'
|
||||
]
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user