You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I clone this webpack5-starter, it's very helpful, thanks for all your work. But when I try to test customize cell renderer virtualized table in this webpack template, I got an error when compiling.
import{resolve}from'path'importHtmlWebpackPluginfrom'html-webpack-plugin'import{VueLoaderPlugin}from'vue-loader'importtype{Configuration}from'webpack'constmode: 'production'|'development'=(process.env.MODEasany)??'development'constconfig: Configuration={
mode,entry: {app: resolve('src','main.ts'),},resolve: {extensions: ['.ts','.js','.mjs','.json'],},module: {rules: [{test: /\.mjs$/i,resolve: {byDependency: {esm: {fullySpecified: false}}},},{test: /\.vue$/,loader: 'vue-loader'},{test: /\.m?[tj]s$/,exclude: /node_modules/,loader: 'babel-loader',},{test: /\.css$/,use: ['style-loader','css-loader'],},],},plugins: [newVueLoaderPlugin(),// I removed ElementPlusResolver, because I was already full import the element-plus.newHtmlWebpackPlugin({filename: 'index.html',template: 'public/index.html',})],}exportdefaultconfig
And then I get an error:
ERROR in ./src/App.vue?vue&type=script&lang=tsx&setup=true (./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/App.vue?vue&type=script&lang=tsx&setup=true) 13:12
Module parse failed: Unexpected token (13:12)
File was processed with these loaders:
* ./node_modules/vue-loader/dist/index.js
You may need an additional loader to handle the result of these loaders.
| import { Timer } from '@element-plus/icons-vue'
|
> import type { Column } from 'element-plus'
|
|
@ ./src/App.vue?vue&type=script&lang=tsx&setup=true 1:0-143 1:0-143 1:144-276 1:144-276
@ ./src/App.vue 2:0-66 3:0-61 3:0-61 6:49-55
@ ./src/main.ts 4:0-28 5:22-25
It seems like there is not loader to handle(or compile) tsx, so I try to add a loader to work well with tsx:
Hi. I clone this webpack5-starter, it's very helpful, thanks for all your work. But when I try to test customize cell renderer virtualized table in this webpack template, I got an error when compiling.
App.vue(it's pasted from the offical example):
webpack.config.ts:
And then I get an error:
It seems like there is not loader to handle(or compile)
tsx
, so I try to add a loader to work well withtsx
:Unfortunately, I still got an error:
Could you help me?
The text was updated successfully, but these errors were encountered: