mirror of
https://github.com/marko-js/marko.git
synced 2026-01-25 15:03:04 +00:00
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
import commonjsPlugin from 'rollup-plugin-commonjs';
|
|
import browserifyPlugin from 'rollup-plugin-browserify-transform';
|
|
import nodeResolvePlugin from 'rollup-plugin-node-resolve';
|
|
import babelPlugin from 'rollup-plugin-babel';
|
|
import envify from 'envify';
|
|
import path from 'path';
|
|
|
|
process.env.NODE_ENV = 'production';
|
|
|
|
// NODE_ENV=production browserify -t envify -t markoify --extension='.marko' --global-transform minprops/browserify -o build/bundles/marko.js marko/client.js
|
|
|
|
|
|
export default {
|
|
entry: path.join(__dirname, 'client.jsx'),
|
|
format: 'iife',
|
|
moduleName: 'app',
|
|
plugins: [
|
|
babelPlugin({
|
|
exclude: 'node_modules/**'
|
|
}),
|
|
browserifyPlugin(envify),
|
|
nodeResolvePlugin({
|
|
jsnext: true, // Default: false
|
|
main: true, // Default: true
|
|
browser: true, // Default: false
|
|
preferBuiltins: false,
|
|
extensions: [ '.js', '.jsx' ]
|
|
}),
|
|
commonjsPlugin({
|
|
include: [],
|
|
extensions: [ '.js', '.jsx' ]
|
|
})
|
|
],
|
|
dest: path.join(__dirname, '../build/bundles/react.js')
|
|
};
|