0.0.5 • Published 6 years ago

tf-html-hot-loader v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

处理html热加载

在rules中

{
    test: /\.js$/,
    include: config.srcPath,
    exclude: config.dll.outputPath,
    use:[{
        loader: 'babel-loader',
        options: {
            presets: ['es2015', 'stage-0'],
            cacheDirectory: true
        }
    }, {
        // 参考:https://github.com/AriaFallah/WebpackTutorial/tree/master/part1/html-reload
        loader: 'tf-html-hot-loader',
        options: {
            files: entries, // 这是入口文件对象或数组
            content: function() {
                return (
                    "if (process.env.NODE_ENV !== 'production') {\n" +
                        "require('./" + config.contentPageName + "')\n" +
                    "}"
                )
            }
        }
    }]
}
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago