Commit 93f7a013 authored by Tim Neutkens's avatar Tim Neutkens

Turbopack: Add failing test for #78592

parent bf30cd54
import { ReactNode } from 'react'
export default function Root({ children }: { children: ReactNode }) {
return (
<html>
<body>{children}</body>
</html>
)
}
import duckdbWasm from '@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm'
console.log(duckdbWasm)
export default function Page() {
return <p>hello world</p>
}
import { nextTestSetup } from 'e2e-utils'
describe('file-loader-wasm', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
'@duckdb/duckdb-wasm': '1.29.1-dev132.0',
'file-loader': '^6.2.0',
},
})
it('should work using cheerio', async () => {
const $ = await next.render$('/')
expect($('p').text()).toBe('hello world')
})
})
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
turbopack: {
rules: {
'*.wasm': {
loaders: [
{
loader: 'file-loader',
options: {
esModule: true,
},
},
],
as: '*.js',
},
},
},
webpack(config) {
config.module.rules.push({
test: /\.wasm/,
loader: 'file-loader',
options: {},
})
return config
},
}
module.exports = nextConfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment