mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 22:55:13 +00:00
feat: rollup build, basic typescript support and typescript app
This commit is contained in:
parent
00e13c3e41
commit
e7dd27fa2a
@ -143,6 +143,8 @@ module.exports = (api, options = {}) => {
|
||||
shippedProposals,
|
||||
forceAllTransforms
|
||||
}
|
||||
], [
|
||||
require('@babel/preset-typescript')
|
||||
])
|
||||
|
||||
// JSX
|
||||
|
3
packages/nuxt3/src/index.ts
Normal file
3
packages/nuxt3/src/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './core'
|
||||
|
||||
export const getBuilder = () => import('./builder')
|
@ -217,7 +217,7 @@ export default class WebpackBaseConfig {
|
||||
|
||||
return {
|
||||
resolve: {
|
||||
extensions: ['.wasm', '.mjs', '.js', '.json', '.vue', '.jsx'],
|
||||
extensions: ['.wasm', '.mjs', '.js', '.ts', '.json', '.vue', '.jsx', '.tsx'],
|
||||
alias: this.alias(),
|
||||
modules: webpackModulesDir
|
||||
},
|
||||
|
@ -206,7 +206,7 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
|
||||
|
||||
// Entry points
|
||||
config.entry = Object.assign({}, config.entry, {
|
||||
app: [path.resolve(buildDir, 'entry.client.js')]
|
||||
app: [path.resolve(buildDir, 'entry.client.ts')]
|
||||
})
|
||||
|
||||
// Add HMR support
|
||||
|
@ -114,7 +114,7 @@ export default class WebpackServerConfig extends WebpackBaseConfig {
|
||||
target: 'node',
|
||||
node: false,
|
||||
entry: Object.assign({}, config.entry, {
|
||||
app: [path.resolve(this.buildContext.options.buildDir, 'entry.server.js')]
|
||||
app: [path.resolve(this.buildContext.options.buildDir, 'entry.server.ts')]
|
||||
}),
|
||||
output: Object.assign({}, config.output, {
|
||||
filename: 'server.js',
|
||||
|
Loading…
Reference in New Issue
Block a user