update webpack settings
This commit is contained in:
parent
21df4f3f78
commit
a2c18d8bcd
@ -1,4 +1,3 @@
|
|||||||
// import * as path from 'path';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// FIXME:
|
// FIXME:
|
||||||
@ -30,7 +29,7 @@ const config = (env: Record<string, any>, argv: Record<string, any>): Configurat
|
|||||||
|
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: 'favicon.ico', to: './' },
|
{ from: 'assets', to: './assets' },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ const config = (env: Record<string, any>, argv: Record<string, any>): Configurat
|
|||||||
context: path.resolve(__dirname, 'src'),
|
context: path.resolve(__dirname, 'src'),
|
||||||
|
|
||||||
entry: [
|
entry: [
|
||||||
// 'core-js/stable',
|
// 'core-js/actual',
|
||||||
// 'regenerator-runtime/runtime',
|
// 'regenerator-runtime/runtime',
|
||||||
'./index.ts',
|
'./index.ts',
|
||||||
],
|
],
|
||||||
@ -69,10 +68,7 @@ const config = (env: Record<string, any>, argv: Record<string, any>): Configurat
|
|||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions,
|
extensions,
|
||||||
plugins: [new TsconfigPathsPlugin({
|
plugins: [new TsconfigPathsPlugin({})],
|
||||||
configFile: path.resolve(__dirname, 'tsconfig.json'),
|
|
||||||
extensions,
|
|
||||||
})],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: getPluginList(),
|
plugins: getPluginList(),
|
||||||
@ -86,13 +82,13 @@ const config = (env: Record<string, any>, argv: Record<string, any>): Configurat
|
|||||||
{
|
{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
sourceMap: !isProd,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
loader: 'sass-loader',
|
loader: 'sass-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
sourceMap: !isProd,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user