-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: 클라이언트 파일rollup 번들링 설정 및 static 처리
- Loading branch information
Showing
5 changed files
with
274 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"exec": "babel src --extensions .ts,.tsx --out-dir dist && node dist/app.js" | ||
"exec": "babel src --extensions .ts,.tsx --out-dir dist && rollup --config rollup.config.js && node dist/app.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const babel = require('@rollup/plugin-babel'); | ||
const resolve = require('@rollup/plugin-node-resolve'); | ||
const extensions = ['.js', '.jsx', '.ts', '.tsx']; | ||
const path = require('path'); | ||
console.log('path확인:', path.resolve('jsx-runtime.js')); | ||
module.exports = [ | ||
{ | ||
input: './public/index.tsx', | ||
output: { | ||
file: './dist/public/index.js', | ||
format: 'es', | ||
}, | ||
plugins: [ | ||
babel({ | ||
babelHelpers: 'bundled', | ||
presets: ['@babel/preset-env', '@babel/preset-typescript'], | ||
plugins: [ | ||
[ | ||
'@babel/plugin-transform-react-jsx', | ||
{ importSource: '@core', runtime: 'automatic' }, | ||
], | ||
[ | ||
'module-resolver', | ||
{ | ||
alias: { | ||
'@core/jsx-runtime': path.resolve( | ||
__dirname, | ||
'src/core/jsx-runtime' | ||
), | ||
}, | ||
}, | ||
], | ||
], | ||
extensions, | ||
}), | ||
resolve({ | ||
extensions, | ||
}), | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.