Tryig to fix webpack for Svelte

This commit is contained in:
David Négrier 2021-05-12 15:57:53 +02:00
parent 9bc79c3ed3
commit 62cc1f73ca
3 changed files with 26 additions and 5 deletions

View file

@ -44,7 +44,7 @@ module.exports = {
use: [MiniCssExtractPlugin.loader, 'css-loader?url=false', 'sass-loader'],
},
{
test: /\.svelte$/,
test: /\.(html|svelte)$/,
exclude: /node_modules/,
use: {
loader: 'svelte-loader',
@ -85,12 +85,11 @@ module.exports = {
],
},
resolve: {
/*alias: {
// Note: Later in this config file, we'll automatically add paths from `tsconfig.compilerOptions.paths`
alias: {
svelte: path.resolve('node_modules', 'svelte')
},*/
},
extensions: [ '.tsx', '.ts', '.js', '.svelte' ],
//mainFields: ['svelte', 'browser', 'module', 'main']
mainFields: ['svelte', 'browser', 'module', 'main']
},
output: {
filename: (pathData) => {