We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import.meta
import.meta not support in esbuild-loader(target: es2017) evanw/esbuild#349
esbuild-loader(target: es2017)
I hack this issue by moving import.meta.webpackContext to js files, like
import.meta.webpackContext
js
// utils/webpack-env // refs: https://webpack.js.org/api/module-variables/#importmetawebpackcontext export const contextRequire = import.meta.webpackContext('..', { recursive: true, regExp: /.tsx/, mode: 'sync', })
then use it in App.tsx
App.tsx
import { contextRequire } from '@/utils/webpack-env' console.log(contextRequire('./pages/index.tsx'))
or try supports options recommended in evanw/esbuild#349 (comment)
supports
The text was updated successfully, but these errors were encountered:
No branches or pull requests
import.meta
not support inesbuild-loader(target: es2017)
evanw/esbuild#349I hack this issue by moving
import.meta.webpackContext
tojs
files, likethen use it in
App.tsx
or try
supports
options recommended in evanw/esbuild#349 (comment)The text was updated successfully, but these errors were encountered: