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,
|
shippedProposals,
|
||||||
forceAllTransforms
|
forceAllTransforms
|
||||||
}
|
}
|
||||||
|
], [
|
||||||
|
require('@babel/preset-typescript')
|
||||||
])
|
])
|
||||||
|
|
||||||
// JSX
|
// 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 {
|
return {
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.wasm', '.mjs', '.js', '.json', '.vue', '.jsx'],
|
extensions: ['.wasm', '.mjs', '.js', '.ts', '.json', '.vue', '.jsx', '.tsx'],
|
||||||
alias: this.alias(),
|
alias: this.alias(),
|
||||||
modules: webpackModulesDir
|
modules: webpackModulesDir
|
||||||
},
|
},
|
||||||
|
@ -206,7 +206,7 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
|
|||||||
|
|
||||||
// Entry points
|
// Entry points
|
||||||
config.entry = Object.assign({}, config.entry, {
|
config.entry = Object.assign({}, config.entry, {
|
||||||
app: [path.resolve(buildDir, 'entry.client.js')]
|
app: [path.resolve(buildDir, 'entry.client.ts')]
|
||||||
})
|
})
|
||||||
|
|
||||||
// Add HMR support
|
// Add HMR support
|
||||||
|
@ -114,7 +114,7 @@ export default class WebpackServerConfig extends WebpackBaseConfig {
|
|||||||
target: 'node',
|
target: 'node',
|
||||||
node: false,
|
node: false,
|
||||||
entry: Object.assign({}, config.entry, {
|
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, {
|
output: Object.assign({}, config.output, {
|
||||||
filename: 'server.js',
|
filename: 'server.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user